React Hook Form Plus (RHF+) is an enhanced fork of React Hook Form. It is designed to be a drop-in replacement for React Hook Form, so you can use it in your existing projects without any changes.
npm install @bombillazo/rhf-plusyarn add @bombillazo/rhf-pluspnpm add @bombillazo/rhf-plusSimply replace your React Hook Form import:
// Before
import { useForm } from 'react-hook-form'
// After
import { useForm } from '@bombillazo/rhf-plus'View all features and enhancements β
React Hook Form is a robust and delightful form library for React. Preserving high-quality standards for such a popular package takes time, effort, and thoughtfulness from maintainers. In the case of React Hook Form, this has caused a development bottleneck that slows and stalls contributions.
Thus, rhf-plus was born: a fork of React Hook Form that enhances the library with new features and improvements while keeping the core of the library intact.
- Features: This package aims to enhance React Hook Form's functionality. We avoid other development efforts.
- Compatibility: New features should be additive and non-breaking.
rhf-plusaims to stay closely synced to the original React Hook Form. - Practicality: The enhancements must be practical and solve real-world problems.
- Speed: Discuss, review, and ship features fast!
- Quality: We maintain the same high-quality standards as React Hook Form. This means clean code, thorough testing, and precise documentation.
-
React Hook Form bugs
React Hook Form maintainers are responsible for fixing its bugs. We focus on fixing bugs related to our enhancements. When those bugs are fixed, they are rolled into this package when we sync to the latest React Hook Form version. -
Refactors
We do not refactor React Hook Form code. This includes adding new tooling, changing documentation, updating dependency versions, fixing code styling, and anything unrelated to adding new features and enhancements (these changes complicate syncing the fork with the upstream repository). -
Breaking changes
We do not introduce breaking changes to the React Hook Form API. We only add new features and enhancements that are backward compatible with the existing API. -
Complex/bloated features
We avoid enhancements that aggressively modify large parts of the React Hook Form codebase. This ensures we do not diverge too much from the original package. -
Past React Hook Form versions
As new enhancements are introduced, they are only applied to the current and latest React Hook Form versions. This ensures that we are closely synced to React Hook Form and reduces the overhead of maintaining multiplerhf-plusversions.
- Spread the word about this package so more people can test these enhancements
- Use this library to test the enhancements and provide feedback.
- Report enhancement bugs and issues here.
- Contribute new code to add new enhancements.
- Share the enhancements in the React Hook Form issues where applicable:
- Upvote the issue to garner support
- Link to the enhancement page in this repo to show the available working solution
rhf-plus versions look something like this:
7.55.0-plus.0
\____/\____/|
| | |
1 2 3-
React Hook Form version
The React Hook Form version used as the base to add enhancements to (e.g.,7.55.0) -
Separator token
Separates React Hook Form from RHF+ version (always-plus.) -
RHF+ version
RHF+ version index (e.g.,0)
Note
Please get in touch with maintainers if a new React Hook Form version is available and this library is behind. We will sync rhf-plus and release a new version.
- New RHF+ versions use the latest React Hook Form version as the base version
- RHF+ versions start from index
0- For example, the first version of
rhf-plusbased on React Hook Form7.55.0would be7.55.0-plus.0
- For example, the first version of
- The RHF+ version increments with each new
rhf-plusrelease- For example, a new release based on React Hook Form
7.55.0would bump the version to7.5.0-plus.1
- For example, a new release based on React Hook Form
- The RHF+ version is reset to
0when a new version of React Hook Form is released- For example, if React Hook Form
7.56.0is released, the newly synced version ofrhf-plusbased on that would be7.56.0-plus.0
- For example, if React Hook Form