You can run these examples by doing a npm install
and then run with npm run dev
.
- React Server Component
- Classic counter React example using useState
- Form Action with useTransition
- The useOptimistic hook with manipulating an array in state
- The useActionState hook with incrementer example
- The useFormStatus hook with a button component
- The metadata API in a client component
- A weather form using the useActionState hook
Many of the examples are taken directly from the React.dev docs. They have all been updated to work with TypeScript.
Copyright JaxNode 2025.