Skip to content

📋 React hooks for forms validation without the hassle.

License

Notifications You must be signed in to change notification settings

felipe-ssilva/react-hook-form

Repository files navigation

📋 React forme 🚧 (under development)

Install

$ npm install react-forme

Quickstart

import useForm from 'react-forme';

function App() {
    const { register, handleSubmit } = useForm();
    const onSubmit = (data) => { console.log(data); }
    
    return <form onSubmit={handleSubmit(onSubmit}>
        <input name="firstname" ref={(ref) => register({ ref, required: true })} />
        <input name="lastname" ref={(ref) => register({ ref, pattern: "[a-z]{1,15}" })} />
        <input type="submit" />
    </form>
}

About

📋 React hooks for forms validation without the hassle.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 98.6%
  • Other 1.4%