🏗️Build your first dApp with plurality
...
Plurality is currently in beta. Please do not use it in production.
We will create our first dApp that uses Plurality using React framework with typescript.
Want to jump directly to code? Checkout final code on Git
Create a react project with Typescript
Open the folder plurality-dapp in your editor of choice
Install the plurality widget using the following command
Go to src/ folder and create a new file declaration.d.ts with the following single line (Note: this step would resolve once a new package update with types comes out):
Now open App.tsx file and replace the contents with the following code block
Now run the demo with the following command
You should see a big pink button. Clicking on it will open the widget with the required workflows. If the user completes the workflow, their data will be received in the handleDataReturned
event function.
Last updated