JB1905 / devtools

πŸ“‹ DevTools to help debug forms.

Home Page:https://react-hook-form.com/dev-tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Performant, flexible and extensible forms with easy to use validation.

npm downloads npm npm

Goal

This React Component will help you to debug forms when working React Hook Form, and give you more insight about your form's detail.

Install

$ npm install @hookform/devtools -D

Quickstart

import React from 'react';
import { useForm } from 'react-hook-form';
import { DevTool } from '@hookform/devtools';
import './App.css';

const App = () => {
  const { register, control, handleSubmit } = useForm({
    mode: 'onChange',
  });

  return (
    <>
      <DevTool control={control} placement={"top-left"} />

      <form onSubmit={handleSubmit(d => console.log(d))}>
        <h1>React Hook Form DevTools</h1>

        <label>Test</label>
        <input name="test" ref={register} />

        <input type="submit" />
      </form>
    </>
  );
};

export default App;

Backers

Thanks goes to all our backers! [Become a backer].

Organizations

Thanks goes to these wonderful organizations! [Contribute].

Contributors

Thanks goes to these wonderful people! [Become a contributor].

About

πŸ“‹ DevTools to help debug forms.

https://react-hook-form.com/dev-tools


Languages

Language:TypeScript 76.9%Language:JavaScript 14.7%Language:CSS 7.4%Language:HTML 0.9%Language:Shell 0.1%