Skip to content

Releases: forge42dev/remix-hook-form

v4.3.0

28 Mar 11:14
Compare
Choose a tag to compare

What's Changed

  • Fix extra re-renders caused by formState changes by @ekerik220 in #86

New Contributors

Full Changelog: v4.2.0...v4.3.0

v4.2.0

03 Mar 10:43
Compare
Choose a tag to compare

What's Changed

  • Add validatingFields to formState return from useRemixForm to be compatible with react-hook-form 7.51.0 by @AdiRishi in #85

New Contributors

Full Changelog: v4.1.0...v4.2.0

v4.1.0

13 Feb 15:38
Compare
Choose a tag to compare

What's Changed

  • fix: replace deprecated zod method in readme by @geeron in #68
  • docs: update readme and specify install of react-hook-form by @geeron in #70
  • fix: add passthrough options to reset by @Roanmh in #74
  • feat: added handling for date in createFormData by @TheYoxy in #67

New Contributors

Full Changelog: v4.0.0...v4.1.0

v4.0.0

13 Jan 20:18
Compare
Choose a tag to compare

Error handling

From version 4.0.0 remix-hook-form now uses react-hook-form native errors prop instead of merging frontend and backend errors which should allow for consistent behavior across the two packages and this brings us one step closer to the original implementation

What's Changed

New Contributors

Full Changelog: v3.2.1...v4.0.0

v3.2.1

18 Nov 12:31
0617769
Compare
Choose a tag to compare

File upload example

I've added a file upload example and how it works on the server side and how you can parse files.
Bug fix for fetcher typing

What's Changed

Full Changelog: v3.0.3...v3.2.1

v3.0.3

28 Oct 11:37
Compare
Choose a tag to compare

Bug fixes

Fixed a lot of smaller issues and bugs that have arisen from the removal of JSON.stringify()

Full Changelog: v3.0.0...v3.0.3

v3.0.0

26 Oct 11:15
511c0bb
Compare
Choose a tag to compare

Form data submission rework

Earlier versions of remix-hook-form were using the following method to store formData to be sent to the server:

const data = yourClientData;
const formData = new FormData();
formData.set("formData", JSON.stringify(data));
submit(formData);

The problems with this approach were two fold:

  • it caused URL's to be very ugly if used in combination with GET
  • it didn't allow you to submit files

Well I've decided to do a complete rework and changed it to work like so:

const data = yourClientData;
const formData = new FormData();
Object.entries(data).map(helper)
submit(formData);

The important thing in the change is that it converts arrays, objects, numbers and booleans to strings before setting it into form data because it supports only string but another thing is that it appends files now so you can do file submissions with remix-hook-form.

File upload support

This has been requested for a while and has been added with this release. The only caveat is that you need to handle the file parsing on the server yourself. Remix-hook-form could, but won't provide a custom implementation for unstable_parseMultiPartFormData but that could lead to issues where the package doesn't support every deployment target so you will have to handle this part on your own!

What's Changed

Full Changelog: v2.0.0...v3.0.0

v2.0.0 - ESM support

15 Sep 14:37
Compare
Choose a tag to compare

ESM support!

From version 2.0.0 you can use remix-hook-form in both ESM and CJS fully typed!

Full Changelog: v1.2.3...v2.0.0

v1.2.3

10 Sep 10:55
Compare
Choose a tag to compare

isSubmitting enhancement

From v1.2.3 isSubmitting will be true until your action returns a response/redirects or until your fetcher is idle again when you submit your form instead of being true as soon as the validation on the client passes

What's Changed

Full Changelog: v1.2.2...v1.2.3

v1.2.2

18 Aug 13:32
Compare
Choose a tag to compare

Fetcher support

From version 1.2.0 you can pass in fetchers and use those instead of the default submit and actionData.

What's Changed

New Contributors

Full Changelog: v1.1.2...v1.2.2