-
Notifications
You must be signed in to change notification settings - Fork 0
Labels
Priority: HighHigh priority. Downvote to attempt to lower priority.High priority. Downvote to attempt to lower priority.
Description
This is a consequence of when: Since when doesn't really contribute to the calculation of whether a route matches, but for all practical purposes it is one more constraint, weird things happen and fallback content is not shown.
Proposal 1
This is the simpler one: Add the ignoreForFallback property to the <Route> component and associated route data. Then modify the route matching algorithm to not use a route's matching result if this new property is true.
Advantages:
- Small change
- Simple change
Disadvantages:
- One more thing for the user to know and understand
- Doesn't really "fix" the weirdness around this whole thing
Proposal 2
Modify the route matching algorithm to evaluate any provided when predicates for the purposes of calculating the noMatches value.
Advantages:
- No new addition so the user doesn't have one more thing to know and understand
- Seems more logical: For the purposes of fallback content,
whenresults are accounted for
Disadvantages:
- Only
noMatchesgets to usewhenpredicates; actual matching of routes still don't use it - Doesn't really "fix" the weirdness around this whole thing
- Bye-bye loop optimization; this would have to repeat the loop over every route instead of the current calculate-noMatches-on-the-go algorithm
Metadata
Metadata
Assignees
Labels
Priority: HighHigh priority. Downvote to attempt to lower priority.High priority. Downvote to attempt to lower priority.