v3.0.0
What's Changed
💥 Breaking Change
-
How to migrate from v2 to v3 by @Randagio13 in #26
Import the
useRapidForm
hook fromrapid-form
package.- import useRapidForm from 'rapid-form'; + import { useRapidForm } from 'rapid-form';
Replace the
handleSubmit
,reset
, andsubmitValidation
functions with therefValidation
function.- const { validation, handleSubmit, reset, submitValidation } = useRapidForm(); + const { refValidation } = useRapidForm();
Use the
refValidation
function to validate the form fields.- <input name="username" ref={validation} required /> + <form ref={(ref) => refValidation(ref)}> + <input name="username" required /> + </form>
🐛 Bug Fix
- Fix home page button link by @Randagio13 in #29
📝 Documentation
- Update home page by @Randagio13 in #28
Full Changelog: v2.1.0...v3.0.0