Skip to content

Releases: JoviDeCroock/Hooked-Form

4.2.1

11 Mar 19:51
Compare
Choose a tag to compare

This release includes some improvements to the general typings and a size improvment of 30kb minzipped!

The long wait

28 Nov 10:54
Compare
Choose a tag to compare

Breaking

  • The components have made place for a full hooks implementation (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

Deprecation

The Form HOC is deprecated in favor of the <HookedForm /> component

Features

  • <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.

Internals

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)

Performance

15 Jun 08:22
Compare
Choose a tag to compare

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.

Performance!

17 Mar 09:32
Compare
Choose a tag to compare

1.6.0

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

Feature

  • Hooked-form now offers a new feature named useFormConnect, this hooks returns you all the metadata and values for the current form.
  • isDirty is now injected into the form.

Fixes

  • toPath now does not fail when trying to resolve numbers like pins[200] this would return 2 before this fix.

Chores

  • After a great PR by @Pruxis where he replaced all object recreation with mutations in the reduce function to deriveInitial values etc we went even further and made the reduce into a for in.
  • nested if statements have been reduced by inlining them all (these were mainly dev checks)

Planned

  • Deprecate injection of values, touched and validate. This can be asked by using useFormConnect, the main reason behind this being the notion that this rerenders the component very often without too much added value.

React hooks official release

06 Feb 14:46
Compare
Choose a tag to compare
1.3.1

chore: update lockfile

bundle size oriented release

01 Feb 15:22
Compare
Choose a tag to compare

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)!

Focussed on performance

20 Nov 20:00
Compare
Choose a tag to compare
Pre-release
  • Heavily reduced bundleSize
  • New Array methods (swap, ...)

First Draft

20 Nov 18:45
Compare
Choose a tag to compare
First Draft Pre-release
Pre-release

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.