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 allows child routes with absolute paths that match the combined path of all their parent routes. Child routes with absolute paths that do not match their parent routes are an error.
This should make it a little easier for people who prefer to define their route paths in a separate file of constants to do so without having to convert them to relative paths when they create their route config, like:
This PR also makes the following improvements:
<Route index>
prop that throws if that route has children. This doesn't really affect the execution of the code, but should make it easier to scan and a little saferRouteObject
type so that every property is optional (same as with<Route>
's props. This eliminates the need for thePartialRouteObject
interface, so it's gonematchRoutes
on eachmatch.route
as the one that was passed in. This should make it easier for developers to pass through custom properties in their route objectscreateRoutesFromArray
utility method. You can now just use your array directly inmatchRoutes
instead of running it throughcreateRoutesFromArray
firstFixes #7335