This release makes it easier to work with apps that have multiple entry points. They now resolve relative to the path of the route that rendered them. Previously these resolved relative to the parent route's path.
If you'd like to test it out, install from npm: $ npm install history week's release adds some much-needed polish to a few niche features of the router: splat routes (a route that uses a * path) and basenames. The prop will be in v6, but it isn't ideal for animation.ĭevelopment for v6 is chugging along on the dev branch. We are going to add some animation primitives (see ).I still need to write up something here that explains our rationale. We are going to remove useBlocker() and in our initial v6 release, with plans to revisit them and possibly add them back at some point in the future.However, this makes it difficult to link to the parent route when you're in a splat route. Currently a operates on the URL pathname. We are very close to a stable release! The last big code changes we need to make are: The router will issue a warning if your route path ends with * but not /* This means that will always match as if it were. Splats in route paths ( *) match only after a / in the URL.This reverses a decision that we made in beta.5 to remove them. Provide all parent route params to descendant.Fixes a route matching regression with splat routes that was introduced in beta.5.Makes "layout routes" (routes with no path) never match unless one of their children do.This means that will still be active at /home/users, but not at /home/users2. Make match only whole URL segments instead of pieces.SSR Example – A server-rendered app that uses on the server and uses a with ReactDOM.hydrate() on the clientĮach example includes a button in the README that allows you to instantly launch a running instance on StackBlitz that you can play with.
Search Params Example – Demonstrates how to build a simple search form that uses the new useSearchParams() hook.Auth Example – Demonstrates an authentication flow including using the new useNavigate() hook, the element, and location.state.Basic Example – A basic client-side app for v6 showing how to use nested routes, layouts, links, and the new API.So far, we have examples for the following: We have begun creating some examples for v6 that we hope will help developers make effective use of all the new features we have.
See the end of this post for an update on our roadmap between here and v6 stable. No big enhancements in this release, just squashing bugs and writing lots of tests! Also, we are hard at work on cranking out examples for v6.