-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
9 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# easy-peasy-typescript | ||
# easy-peasy-typescript + `react-hook-form` | ||
|
||
This is an example implementation of using Typescript with [Easy Peasy](https://github.com/ctrlplusb/easy-peasy). This grants you a fully typed global state solution for React, which abstracts all of the Redux boilerplate whilst still granting you access to all of its power. | ||
An example implementation of using Typescript with [react-hook-form](https://github.com/react-hook-form/react-hook-form) and [Easy Peasy](https://github.com/ctrlplusb/easy-peasy). | ||
|
||
## Getting started | ||
React Hook Form is built based on uncontrolled input, which means you don't need to change input value via state by onChange. Registering forn inputs ensures that `react-hook-form`'s `handleSubmit` function will receive the form data when form validation is successful. | ||
|
||
``` | ||
git clone https://github.com/ctrlplusb/easy-peasy-typescript | ||
cd easy-peasy-typescript | ||
npm install | ||
npm start | ||
``` | ||
The fully typed global state solution for React abstracts Redux boilerplate, and also grants access to all of its power. | ||
|
||
## `react-hook-form` supporting documentation | ||
|
||
- Uncontrolled Components in React https://reactjs.org/docs/uncontrolled-components.html | ||
- `register` and `handleSubmit` API docs https://react-hook-form.com/api#register |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters