-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Closed
Description
Since path-to-regexp accepts arrays in addition to strings for the pattern argument, I think it would follow for React Router to be able to accept the prop without issuing a warning. Passing an array for path works fine in the latest beta in terms of matching appropriately, you just get a prop types warning.
This has been brought up before (#4159) and rejected, but I think it's possible with the v4 design. The only question I have looking at the source is how you would approach caching the match. Maybe just not caching if the pattern is an array? Or possibly stringifying the array and using that for the key? I'm not sure what the realized perf difference would be.
gotbahn, cuth, votiakovbogdan, yujingaya and alecdwm
Metadata
Metadata
Assignees
Labels
No labels