react-router-native
Advanced tools
Changelog
v6.23.1
Date: 2024-05-10
undefined
to be resolved through <Await>
(#11513)document
check when checking for document.startViewTransition
availability (#11544)react-router-dom/server
import back to react-router-dom
instead of index.ts
(#11514)@remix-run/router
- Support unstable_dataStrategy
on staticHandler.queryRoute
(#11515)Full Changelog: v6.23.0...v6.23.1
Changelog
v6.23.0
Date: 2024-04-23
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.
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.
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