A responsive form using useForm hook and react-query.
- Inform user : if there is errors in inputs fulfillment, if submission is successful, if submission is not successful
- All inputs data from an array
To test it, set VITE_IS_TEST as true in .env
For production, change api url to yours in .env VITE_API_URL='your-api-url' and in utils/index.jsx → usePostForm hook → customFetch.post('/your-api-route', mailBody)
React powered by Vite
With :
- @tanstack/react-query
- react-hook-form - useForm
- react-toastify for beautiful toaster
- miragejs to mockup server response
- TailwindCss & DaisyUI for styling
Download zip or clone repo and...
yarn
yarn run dev
Happy coding ;)