State Management
jotai atom:
- has default value matching shape of typed object
hooks:
- check for default value, then
- populate state via queries or calculations
- returns direct values
components:
- retrieving state from hook now initializes it
- can still modify state using the jotai atom
This is a wagmi + RainbowKit + Next.js project bootstrapped with create-wagmi
Run npm run dev
in your terminal, and then open localhost:3000 in your browser.
Once the webpage has loaded, changes made to files inside the src/
directory (e.g. src/pages/index.tsx
) will automatically update the webpage.
To learn more about Next.js or wagmi, check out the following resources:
- wagmi Documentation – learn about wagmi Hooks and API.
- wagmi Examples – a suite of simple examples using wagmi.
- RainbowKit Documentation – learn more about RainbowKit (configuration, theming, advanced usage, etc).
- Next.js Documentation learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.