This repo uses React Hook Forms to generate a form based on a yup schema. RHF handles our validation and allows us to easily extend our form with new fields and rules.
The form is split into multiple stages, which are generated based on a config object that connects to the form schema.
The form status and methods are then provided to the rest of the app through context, using useFormContext
allowing us to surfice errors within the navigation, etc.
It only has basic styles, but this are provided by Tailwind.
This project was bootstrapped with Create React App.
- Clone the repo
cd
into root folder- Install dependancies
yarn install
||npm i
- Have funn
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.