Comments (10)
react-hook-form and Formik?
First of all, both libs try to solve the same problem which is making form building experience easy and great. However, there are some fundamental differences between the two, react-hook-form
is built with uncontrolled input in mind and try to provide your form with best performance and least re-render if possible. On top of that, react-hook-form
is built by React Hook and used as hook, which means there is no Component for you to import
. Here are some of the differences:
React Hook Form | Formik | |
---|---|---|
Component | uncontrolled | controlled |
Rendering | minimum re-render | re-render according to local state (as you type in the input) |
API | Hooks: no components to wrap | Component + Hooks: wrapper components (RenderProps, Form, Field) |
Status | Small Community: New lib | Large Community: well-established/most popular form lib in the community |
Size | Small | Meidum 2x bigger than React Hook Form |
Validation | Built-in & Yup | Build your own & Yup |
Learning curve | Low | Medium |
Conclusion:
I believe both lib/solution can make and achieve great results in form building, and both libs are trying to help developers around the world to make form building life easier and fun.
@barrymay @JeromeDeLeon @stramel feel free to add or edit
from documentation.
You can actually move issues to other repos https://help.github.com/en/github/managing-your-work-on-github/transferring-an-issue-to-another-repository
from documentation.
thanks @harobed I will update that tonight :) it's pretty much controlled vs uncontrolled and react hook form is purely build by hook too.
from documentation.
actually I am going to leave my answer here and we can all contribute to the answer.
from documentation.
@harobed you want to migrate this issue to the website repo? I am going to close it here for now, cause it's not an issue.
from documentation.
let me know what you guys think of the answer as well before I updated it on the website. feel free to adjust and leave questions too.
from documentation.
What about the lib learning curve? IMHO react hook form is very easy to use because it's built by an average developer hahaha and tries to make form simple for myself and others.
from documentation.
What about the lib learning curve? IMHO react hook form is very easy to use
@bluebill1049 yes, react-hook-form
learning curve is lower that formik
.
from documentation.
Thanks ❤️ @bluebill1049
from documentation.
my pleasure and thank you for your suggestion too :)
from documentation.
Related Issues (20)
- Issue: Documentation Discrepancy: Importing Material-UI Input in React Hook Form HOT 1
- Issue: Documentation link incorrect HOT 1
- Typo: "recommend" instead of "recommended"
- issue: Application error: a client-side exception has occurred (see the browser console for more information).
- Improve documentation for useWatch exact
- Update twitter icon HOT 2
- issue: useFieldArray Unable to track newly added elements When "shouldUnregister" is enabled HOT 1
- The `RegisterOptions` type does not match the documentation
- Document watch callback type parameter
- issue: In the specified sandbox environment, when the onChange event handler is invoked with undefined as its argument, the Component does not receive the updated value. However, despite this, the form data is successfully updated. HOT 4
- issue: maxLength does not limit input field to length HOT 1
- Two different documentation versions
- issue: Website appears as a blank background HOT 2
- Documentation: keepIsSubmitSuccessful missing from documentation
- 🥇 Features : Scrollspy or scrolling navigation on documentation site HOT 2
- Feature Request: Implement Scrollspy for Dynamic Navigation
- issue: typo/grammar-issues in /docs/useform/seterror HOT 2
- form builder: "input creator" form state not updated correctly when switching between inputs
- Beekai.com outbound connection on homepage? HOT 1
- Improve documentation on setError HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from documentation.