Skip to content

Releases: forge-42/remix-hook-form

v7.1.1

21 Oct 10:22

Choose a tag to compare

v7.0.2

21 Oct 10:11
d718447

Choose a tag to compare

What's Changed

  • Fix isSubmitting state value when using encType application/json by @BobReid in #170
  • Fix: Multiple File Input by @phyziyx in #174

New Contributors

Full Changelog: v7.0.1...v7.0.2

v7.0.1

09 Apr 10:46
7523369

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v7.0.0...v7.0.1

v7.0.0

05 Apr 11:51

Choose a tag to compare

Middleware mode

From v7 you can use middleware to extract the form data and access it anywhere in your actions and loaders.
All you have to do is set it up in your root.tsx file like this:

import { unstable_extractFormDataMiddleware } from "remix-hook-form/middleware";

export const unstable_middleware = [unstable_extractFormDataMiddleware()];

And then access it in your actions and loaders like this:

import { getFormData, getValidatedFormData } from "remix-hook-form/middleware";

export const loader = async ({ context }: LoaderFunctionArgs) => {
  const searchParamsFormData = await getFormData(context); 
  return { result: "success" };
};
export const action = async ({ context }: ActionFunctionArgs) => {
  // OR:   const formData = await getFormData(context); 
  const { data, errors, receivedValues } = await getValidatedFormData<FormData>(
    context,
    resolver,
  );
  if (errors) {
    return { errors, receivedValues };
  } 
  return { result: "success" };
};

What's Changed

New Contributors

Full Changelog: v6.2.0...v7.0.0

v6.2.0

03 Apr 15:39
3d63a88

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v6.1.3...v6.2.0

v6.1.3

21 Jan 16:29

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v6.1.2...v6.1.3

v6.1.2

05 Jan 17:13

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v6.1.1...v6.1.2

v6.1.1

05 Jan 17:09
bc65d42

Choose a tag to compare

What's Changed

Full Changelog: v6.1.0...v6.1.1

v6.1.0

12 Dec 11:20

Choose a tag to compare

getValidatedFormData typing fix

getValidatedFormData now properly returns the types instead of any

What's Changed

Full Changelog: v6.0.0...v6.1.0

v6.0.0 - React Router v7

23 Nov 11:59

Choose a tag to compare

React Router v7

The version 6 of remix-hook-form and onwards now works on react-router v7+ and is not remix specific anymore! If you're using remix you can stay on older versions until you're ready to upgrade

What's Changed

  • feat: add action support from Form config by @aon in #115

New Contributors

  • @aon made their first contribution in #115

Full Changelog: v5.1.1...v6.0.0