chore: Update version for release #14431
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to release-next, this PR will be updated.
Releases
[email protected]
Patch Changes
handle external redirects in from server actions (#14400)
New (unstable)
useRoute
hook for accessing data from specific routes (#14407)For example, let's say you have an
admin
route somewhere in your app and you want any child routes ofadmin
to all have access to theloaderData
andactionData
fromadmin.
You might even want to create a reusable widget that all of the routes nested under
admin
could use:In framework mode,
useRoute
knows all your app's routes and gives you TS errors when invalid route IDs are passed in:useRoute
returnsundefined
if the route is not part of the current page:Note: the
root
route is the exception since it is guaranteed to be part of the current page.As a result,
useRoute
never returnsundefined
forroot
.loaderData
andactionData
are marked as optional since they could be accessed before theaction
is triggered or after theloader
threw an error:If instead of a specific route, you wanted access to the current route's
loaderData
andactionData
, you can calluseRoute
without arguments:This usage is equivalent to calling
useLoaderData
anduseActionData
, but consolidates all route data access into one hook:useRoute
.Note: when calling
useRoute()
(without a route ID), TS has no way to know which route is the current route.As a result,
loaderData
andactionData
are typed asunknown
.If you want more type-safety, you can either narrow the type yourself with something like
zod
or you can refactor your app to pass down typed props to yourAdminWidget
:@react-router/[email protected]
Patch Changes
[email protected]
@react-router/[email protected]
@react-router/[email protected]
Patch Changes
[email protected]
@react-router/[email protected]
Patch Changes
Update
valibot
dependency to^1.1.0
(#14379)New (unstable)
useRoute
hook for accessing data from specific routes (#14407)For example, let's say you have an
admin
route somewhere in your app and you want any child routes ofadmin
to all have access to theloaderData
andactionData
fromadmin.
You might even want to create a reusable widget that all of the routes nested under
admin
could use:In framework mode,
useRoute
knows all your app's routes and gives you TS errors when invalid route IDs are passed in:useRoute
returnsundefined
if the route is not part of the current page:Note: the
root
route is the exception since it is guaranteed to be part of the current page.As a result,
useRoute
never returnsundefined
forroot
.loaderData
andactionData
are marked as optional since they could be accessed before theaction
is triggered or after theloader
threw an error:If instead of a specific route, you wanted access to the current route's
loaderData
andactionData
, you can calluseRoute
without arguments:This usage is equivalent to calling
useLoaderData
anduseActionData
, but consolidates all route data access into one hook:useRoute
.Note: when calling
useRoute()
(without a route ID), TS has no way to know which route is the current route.As a result,
loaderData
andactionData
are typed asunknown
.If you want more type-safety, you can either narrow the type yourself with something like
zod
or you can refactor your app to pass down typed props to yourAdminWidget
:Updated dependencies:
[email protected]
@react-router/[email protected]
@react-router/[email protected]
[email protected]
Patch Changes
[email protected]
@react-router/[email protected]
Patch Changes
[email protected]
@react-router/[email protected]
@react-router/[email protected]
Patch Changes
@react-router/[email protected]
@react-router/[email protected]
Patch Changes
[email protected]
@react-router/[email protected]
Patch Changes
@react-router/[email protected]
@react-router/[email protected]
Patch Changes
[email protected]
@react-router/[email protected]
@react-router/[email protected]
[email protected]