You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.
If I define <Fragment forRoute='/hello'>, it will match /hello but also /hellooooo. I'm not sure if that's intended behavior or a bug, but I don't see why anyone would want it to work like that. Is there a way to make the route match exactly without having to write a custom withConditions function? Might be useful to add a forExactRoute or something like <Fragment exact forRoute='/hello'> like they do in react-router.
The text was updated successfully, but these errors were encountered:
In case someone else stumbles upon this issue looking for a solution, I thought I would share mine:
// Define this helper function somewhereconstisExactMatch=route=>location=>location.route===route// Then later:<FragmentwithConditions={isExactMatch(someRoute)}>...</Fragment>
Basically, use withConditions to test the route directly. It's not super pretty, but does the job.
If I define
<Fragment forRoute='/hello'>
, it will match/hello
but also/hellooooo
. I'm not sure if that's intended behavior or a bug, but I don't see why anyone would want it to work like that. Is there a way to make the route match exactly without having to write a customwithConditions
function? Might be useful to add aforExactRoute
or something like<Fragment exact forRoute='/hello'>
like they do in react-router.The text was updated successfully, but these errors were encountered: