govuk-react with Astro
These pages are rendered on the server by Astro, and work before and without JavaScript.
Forms
These forms use Conform. They submit, and show their errors, before and without JavaScript.
- Sign in: a form with manual validation
- Create an account: async validation on the client and server
- Create an account (async schema): the same form, with an async schema
- Tasks: a list of fields you can add to, remove and reorder
Hydration
These pages choose how much JavaScript each component needs.
- Islands: React hydrates only the components that need it
- Without React: components enhanced by inline scripts, with no React in the browser
- Upgrade to React: an inline script enhances a component, then React takes over and keeps what the user did
- Working together: tabs, an accordion and modals holding forms, in one island, to prove they work together