Skip to content

RohitNethi/FormHook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Usage

Initialization

import useForm from 'form-hook.js';
const { inputs, handleInputChange, handleSubmitForm, handleInputObjectChange } = useForm(
    initialValues, callbackFn,
  );

In Action

const { inputs, handleInputChange, handleSubmitForm, handleInputObjectChange } = useForm(
    {
        first_name: ''
    },  callbackFn,
);
  
  <input
        name="first_name"
        value={inputs.first_name}
        onChange={handleInputChange}
  />

About

Simple react custom hook to handle form data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published