0.3.0 • Published 5 years ago

react-use-form-state-extended v0.3.0

Weekly downloads
298
License
MIT
Repository
github
Last release
5 years ago

react-use-form-state

(but with built-in helpers)

Why?

Because react-use-form-state is an incredibly elegant form handling hook library for React, but lacks a few quality of life adjustments I'd like to see.

This library is a drop in replacement for react-use-form-state, so all docs for that library apply here... however we've added the following to the formState:

keyDescription
isValid: booleantrue by default
hasChanges: booleanfalse by default
hasErrors: booleanfalse by default
numberOfErrors: number0 by default... simply the number of keys erported in the form.errors object
changes: object or undefinedundefined by default, but returns an object with only the changed fields. Useful for sending PATCH objects via REST, for example.

Installation

yarn add react-use-form-state-extended

API

Please see react-use-form-state for the full documentation. All credit goes to @wsmd for his amazing work!

0.3.0

5 years ago

0.2.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago