Socket
Socket
Sign inDemoInstall

react-router-dom-v5-compat

Package Overview
Dependencies
21
Maintainers
1
Versions
206
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
2345
21Next

6.23.1-pre.0

Diff

mjackson
published 6.23.0 •

Changelog

Source

v6.23.0

Date: 2024-04-23

What's Changed

Data Strategy (unstable)

The new unstable_dataStrategy API is a low-level API designed for advanced use-cases where you need to take control over the data strategy for your loader/action functions. The default implementation is today's behavior, to fetch all loaders in parallel, but this option allows users to implement more advanced data flows including Remix "Single Fetch", user-land middleware/context APIs, automatic loader caching, and more. Please see the docs for more information.

Note: This is a low-level API intended for advanced use-cases. This overrides React Router's internal handling of loader/action execution, and if done incorrectly will break your app code. Please use with caution and perform the appropriate testing.

Skip Action Error Revalidation (unstable)

Currently, all active loader's revalidate after any action submission, regardless of the action result. However, in the majority of cases a 4xx/5xx response from an action means that no data was actually changed and the revalidation is unnecessary. We've introduced a new future.unstable_skipActionErrorRevalidation flag that changes the behavior here, and we plan to make this the default in future version of React Router.

With this flag enabled, action's that return/throw a 4xx/5xx response status will no longer automatically revalidate. If you need to revalidate after a 4xx/5xx result with this flag enabled, you can still do that via returning true from shouldRevalidate - which now also receives a new unstable_actionStatus argument alongside actionResult so you can make decision based on the status of the action response without having to encode it into the action data.

Minor Changes

  • Add a new unstable_dataStrategy configuration option (#11098, #11377)
  • @remix-run/router - Add a new future.unstable_skipActionRevalidation future flag (#11098)
  • @remix-run/router - SSR: Added a new skipLoaderErrorBubbling options to the staticHandler.query method to disable error bubbling by the static handler for use in Remix's Single Fetch implementation (#11098, (#11377))

Full Changelog: v6.22.3...v6.23.0

mjackson
published 6.23.0-pre.1 •

mjackson
published 6.23.0-pre.0 •

mjackson
published 0.0.0-experimental-0f302655 •

mjackson
published 0.0.0-experimental-c7dd3d3a •

mjackson
published 6.22.3 •

Changelog

Source

v6.22.3

Date: 2024-03-07

Patch Changes

  • Fix a future.v7_partialHydration bug that would re-run loaders below the boundary on hydration if SSR loader errors bubbled to a parent boundary (#11324)
  • Fix a future.v7_partialHydration bug that would consider the router uninitialized if a route did not have a loader (#11325)

Full Changelog: v6.22.2...v6.22.3

mjackson
published 6.22.3-pre.0 •

mjackson
published 0.0.0-experimental-71108452 •

mjackson
published 0.0.0-experimental-432fcb2e •

2345
21Next
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc