Skip to content

mkidawa/react-hook-form-ts-zod-i18n-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Form Example with usage of React Hook Form, Typescript, zod and i18next

This project was bootstrapped with Create React App.

Disclaimer

Main goal of this repository is to provide a backbone for setting up React Hook Form with several enhancements such as typescript, zod resolvers, error message translation. Styling was reduced to a bare minimum.

Stack

React Hook Form

React Hook Form provides methods and components necessary in advanced form creation and state management. In this example project logic of retrieving form field state has been transferred to nested components with usage of hooks such as useFormContext or useController.

zod

Zod is a great schema validation library that can be used with React Hook Form, apply restrictions and keep an eye on the shape of our data.

react-i18next

i18n-react has been configured to provide translations for error messages.

Scripts

In the project directory, you can run:

yarn start

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.

About

React Form Example with usage of React Hook Form, Typescript, zod and i18next

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published