Skip to content

Releases: sergiodxa/remix-utils

v4.0.0

10 Nov 17:02
Compare
Choose a tag to compare

What's Changed

New Features

Documentation Changes

New Contributors

Full Changelog: v3.4.0...v4.0.0

v3.4.0

22 Oct 17:30
Compare
Choose a tag to compare

What's Changed

New Features

  • Accept FormData in verifyAuthenticityToken alongside a Request by @dahlbyk in #90
  • Only create a new authenticity token if not already in the session by @myleslinder in #97

Documentation Changes

New Contributors

Full Changelog: v3.3.0...v3.4.0

v3.3.0

04 Jun 16:55
Compare
Choose a tag to compare

What's Changed

New Features

Documentation Changes

Bug Fixes

  • Ensure useLoaderData & useActionData has stable values by @sergiodxa in #85

New Contributors

Full Changelog: v3.2.0...v3.3.0

v3.2.0

11 May 17:50
Compare
Choose a tag to compare

What's Changed

New Features

Documentation Changes

New Contributors

Full Changelog: v3.1.0...v3.2.0

v3.1.0

29 Apr 06:02
Compare
Choose a tag to compare

What's Changed

New Features

Documentation Changes

New Contributors

Full Changelog: v3.0.0...v3.1.0

v3.0.0

06 Apr 22:51
Compare
Choose a tag to compare

What's Changed

json and useLoaderData/useActionData

The json response helper was updated to don't use type-fest anymore, and now in the init options (second argument) it can receive a replacer function to let you customize how values are transformed to string. Useful to support BigInt, Date, etc.

There are new useActionData and useLoaderData hooks, wrapping the Remix ones, which let you pass a reviver to parse back the objects you serialized with a replacer.

Both hooks lets you also pass a validator function, it receives the value from the loader/action and let you run a validation (e.g. using Zod) to check the value is correct. If you pass a validator, the return type of both hooks is inferred from the return type of the validator.

All response helpers use that json, also a new created response helper for a 201 status code.

Other React changes

The useRouteData now uses the match.id instead of the pathname or a custom ID.

The useRevalidate hook was replaced with useDataRefresh using useFetcher internally. It simulates the same API being discussed on the Remix repo.

The RevalidateLink was removed.

The deprecated usage of ClientOnly was removed.

The custom Outlet and useParentData hooks were removed.

Other Server changes

The verifyAuthenticityToken function now checks if the request body was already used and throw an error.

The bodyParser object was removed.

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

v2.11.1

25 Mar 22:41
Compare
Choose a tag to compare

What's Changed

New Features

Full Changelog: v2.11.0...v2.11.1

v2.11.0

25 Mar 22:18
Compare
Choose a tag to compare

What's Changed

New Features

Full Changelog: v2.10.0...v2.11.0

v2.10.0

21 Mar 19:49
Compare
Choose a tag to compare

What's Changed

New Features

Other Changes

  • Add schema-dts as a peer dependency by @salper in #59

New Contributors

Full Changelog: v2.9.0...v2.10.0

v2.9.0

16 Mar 19:34
Compare
Choose a tag to compare

What's Changed

Other Changes

  • Add StructuredData to support inserting "application/ld+json" scripts by @smerchek in #52

New Contributors

Full Changelog: v2.8.0...v2.9.0