[This is by no means a guide. Just the steps I followed while learning react, typescript, stacks eco and clarity. Will extend / fork & create an FT app around it, using Clarity smart contract]
simple app using @stacks/connect-react & @stacks/ui to connect stacks wallet.
App borrows a lot from Heystack on Stacks
- create and verify template
npx create-react-app stacks-auth --template typescript
yarn start
- cleanup template [first commit in this repo]
- add sample auth code from link
- add dependencies, specially
- @stacks/ui
- @stacks/connect-react
- Note above code won't work straight away, wrap it in a function first
- At this point app should connect with wallet account
- add required hooks and componenets from Heystack
- Install state management lib - Jotai
- add logout button in user-area
- Add contract constants in constants.ts
- Add an info panel component in contract-info-panel.tsx
- Add dependendcies
- @stacks/transactions
- jotai
- Add contract readonly functions in refer-reward.ts