Skip to content

Releases: forge-42/remix-hook-form

v7.0.1

09 Apr 10:46
7523369
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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
Compare
Choose a tag to compare

What's Changed

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

v6.1.0

12 Dec 11:20
Compare
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
Compare
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

v5.1.1

15 Oct 10:59
Compare
Choose a tag to compare

Fixes #114
Fixes #113
Full Changelog: v5.1.0...v5.1.1

v5.1.0

17 Sep 12:37
30e0787
Compare
Choose a tag to compare

What's Changed

Fixes #105

New Contributors

Full Changelog: v5.0.4...v5.1.0