This is a straightforward React project created with Vite, showcasing form handling and field validation using Formik and Yup. In this demo, I've explored two methods to handle the same signup form.
- Vite: Fast build tool for modern web development.
- React: Library for building user interfaces
- Formik: Form management library for React applications.
- Yup : Schema builder for runtime value parsing and validation
- CSS: Styling the application
- Clone the repository.
https://github.com/abhimax/react-formik-yup-demo.git - Navigate to the project directory.
- Install dependencies:
npm installoryarn install. - Run the project:
npm run devoryarn dev.
In this approach, I've utilized the useFormik hook provided by Formik to streamline form management and validation.
Here, I've demonstrated another method of handling the signup form by employing the Formik, Form, and Field components from the Formik library.
Feel free to explore both methods and choose the one that fits your project requirements. Happy coding!