This is a simple Create React App project, but these examples can be easily ported to your preferred framework or build tool.
Run the following in your terminal
git clone https://github.com/deso-protocol/deso-examples-react.git
cd deso-examples-react
npm i
npm run start
If you want to port these examples to your own app, set up a project using the docs for your preferred tool (Create React App, Vite, Nextjs, Remix, Angular, Vue, etc). If you're not sure, Create React App is a reasonable choice for getting a development environment up and running for quick prototyping/experimenting.
Next install the DeSo identity library using your preferred package manager:
# npm
npm i @deso-core/identity
# yarn
yarn add @deso-core/identity
Finally, use the examples found in this repo to help you build social features for your application using the DeSo blockchain
Also note, the emphasis here is own demonstrating how to use the identity library, not UI/UX. The UI for this app is ugly. Do not copy it :)
- What are all these WARNINGS when I run my app?
WARNING in ./node_modules/@deso-core/identity/src/lib/types.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Absolute/Path/deso-examples-react/libs/identity/src/lib/types.ts' file: Error: ENOENT: no such file or directory, open '/Absolute/Path/deso-examples-react/libs/identity/src/lib/types.ts'
This is a known issue with webpack and can be safely ignored. This issue may be resolved by the time you are reading this. See this issue for more context facebook/create-react-app#11752