Performant 2KB React library to manage your forms
MIT License
Bot releases are hidden (Show)
This release includes some improvements to the general typings and a size improvment of 30kb minzipped!
Published by JoviDeCroock almost 5 years ago
Field
, FieldArray
and Error
are gone).useFieldArray.remove
now only accepts a numerical index instead of an object or an index.validateOnBlur
is now default false
in <HookedForm />
in the Form
HOC it will remain default true
The Form
HOC is deprecated in favor of the <HookedForm />
component
<HookedForm>
component which abstracts the <form>
field away, you can pass in props just as you would normally do.initialErrors
are supported on <HookedForm>
onSuccess
now receives a SuccessBag
containing resetForm
useSpy
hook that allows you to spy on arbitrary form values and execute a callback with access to context.We have moved to an internal emitter which is winning us a lot in the performance and bundle size area's
Concluding: performance++ and size -300Bytes (even with the added features)
Published by JoviDeCroock over 5 years ago
After seeing results of: https://81swz.codesandbox.io/
I decided to focus a bit on more bundle size savings and performance.
Only internal changes have been made to achieve this.
Published by JoviDeCroock over 5 years ago
Unofficial Preact X support (all tests succeed but one and this is not due to it not working but due to a scheduling diff in preact and react)!
You can use the components with preact/compat
.
The hooks and Form are available in preact
useFormConnect
, this hooks returns you all the metadata and values for the current form.useFormConnect
, the main reason behind this being the notion that this rerenders the component very often without too much added value.Published by JoviDeCroock over 5 years ago
Published by JoviDeCroock over 5 years ago
After a few releases fully focussed on performance and helping new devs not fall into common pitfalls this new one focusses on reducing the bundle to 2.8KB (minzipped)!
Published by JoviDeCroock almost 6 years ago
Published by JoviDeCroock almost 6 years ago
This is the first working draft of the library, still needs some working on the array methods but in essence it serves its purpose for my usage goals.