Releases: remix-run/react-router
Releases · remix-run/react-router
[email protected]
Patch Changes
- fix: rename resetScroll -> preventScrollReset (#9199)
- Updated dependencies
- @remix-run/[email protected]
[email protected]
Patch Changes
-
c3406eb: fix: Rename
<Deferred>
to<Await>
(#9095)- We are no longer replacing the
Promise
onloaderData
with the value/error
when it settles so it's now always aPromise
. - To that end, we changed from
<Deferred value={promise}>
to
<Await resolve={promise}>
for clarity, and it also now supports using
<Await>
with raw promises from anywhere, not only those onloaderData
from a defer() call.- Note that raw promises will not be automatically cancelled on interruptions
so they are not recommended
- Note that raw promises will not be automatically cancelled on interruptions
- The hooks are now
useAsyncValue
/useAsyncError
- We are no longer replacing the
-
Updated dependencies
- @remix-run/[email protected]
[email protected]
Patch Changes
- Updated dependencies
[email protected]
Patch Changes
- Updated dependencies [c3406eb]
[email protected]
Patch Changes
- Updated dependencies
@remix-run/[email protected]
Patch Changes
-
c3406eb: fix: Rename
<Deferred>
to<Await>
(#9095)- We are no longer replacing the
Promise
onloaderData
with the value/error
when it settles so it's now always aPromise
. - To that end, we changed from
<Deferred value={promise}>
to
<Await resolve={promise}>
for clarity, and it also now supports using
<Await>
with raw promises from anywhere, not only those onloaderData
from a defer() call.- Note that raw promises will not be automatically cancelled on interruptions
so they are not recommended
- Note that raw promises will not be automatically cancelled on interruptions
- The hooks are now
useAsyncValue
/useAsyncError
- We are no longer replacing the
[email protected]
Patch Changes
-
feat: Deferred API Updates (#9070)
- Removes
<Suspense>
from inside<Deferred>
, requires users to render their own suspense boundaries - Updates
Deferred
to use a true error boundary to catch render errors as well as data errors - Support array and single promise usages
return deferred([ await critical(), lazy() ])
return deferred(lazy())
- Remove
Deferrable
/ResolvedDeferrable
in favor of rawPromise
's andAwaited
- Remove generics from
useDeferredData
untiluseLoaderData
generic is decided in 6.5
- Removes
-
Updated dependencies
- @remix-run/[email protected]
[email protected]
Patch Changes
- Updated dependencies
[email protected]
Patch Changes
-
SSR Updates for React Router (#9058)
Note: The Data-Router SSR aspects of
@remix-run/router
andreact-router-dom
are being released as unstable in this release (unstable_createStaticHandler
andunstable_DataStaticRouter
), and we plan to finalize them in a subsequent minor release once the kinks can be worked out with the Remix integration. To that end, they are available for use, but are subject to breaking changes in the next minor release.- Remove
useRenderDataRouter()
in favor of<DataRouterProvider>
/<DataRouter>
- Support automatic hydration in
<DataStaticRouter>
/<DataBrowserRouter>
/<DataHashRouter>
- Uses
window.__staticRouterHydrationData
- Can be disabled on the server via
<DataStaticRouter hydrate={false}>
- Can be disabled (or overridden) in the browser by passing
hydrationData
to<DataBrowserRouter>
/<DataHashRouter>
- Uses
<DataStaticRouter>
now tracks it's own SSR error boundaries onStaticHandlerContext
StaticHandlerContext
now exposesstatusCode
/loaderHeaders
/actionHeaders
foundMissingHydrationData
check removed since Remix routes may have loaders (for modules) that don't return data forloaderData
- Remove
-
Updated dependencies
[email protected]
Patch Changes
- Updated dependencies