-
Notifications
You must be signed in to change notification settings - Fork 114
route list must be complete #39
Comments
I came across this error as well. |
I'm getting a PR ready to make the routes object optional 👍 I'm realizing that it's an advanced feature that isn't necessary for the rest of the library to function. I'll break route matching into a separate "Advanced" section so that it doesn't distract from the examples in the beginning. |
^ Disregard that, I just remembered why preconfigured routes must be provided. Without a defined order for routes, If you have a You need a defined order to ensure that concrete routes like I think we'll keep requiring the route object unless we can find a solution to that in the future (I can't think of any way to make it work, though). I've updated the docs to clarify the purpose of configured routes and to mark them as required. |
Thanks for the clarification. One follow up though: This make sense as the desire would always be to match An example might be a chat component that exists near the root of the component hierarchy, but it should get displayed whenever the route component is |
I think that's good start, but it can be not too obvious to the user why something is failing. If there's a typo on one of the routes in the route object, this |
Two PRs in progress to address this: @dpwrussell, you might want to look at the <Fragment withConditions={location => location.query.superuser}>
<p>Superusers see this on all routes!</p>
</Fragment> |
It was not clear to me that the list of
routes
passed tocreateStoreWithRouter
must be complete. I think this led me astray:I figured I didn't need that to get started. Perhaps it ultimately wont be required? Right now, trying to use a link that isn't in there leads to:
It made sense to me that there could be fragments which didn't correspond to preconfigured routes.
Split out from #35
The text was updated successfully, but these errors were encountered: