[Feature ✨]: Support tagged template literals for multiple paths
With the introduction of having multiple paths for one route, it might be useful to have a way to have an option in an arbitrary place in a path eg. using tagged template literals like so:
<Route path={path`example/${["foo", "bar"]}/thing?`} element={<Example/>} />
Maybe it would make more sense to use some special pattern for this?
Maybe '/example/(foo|bar)/thing?'.
Another option:
<Route path="/example/:name/thing?" allowedParams={{ name: ['foo', 'bar'] }} />
@orenelbaum your last suggestion is now possible with #227 using the following:
<Route path="/example/:fooBar/thing?" matchFilters={{ fooBar: ['foo', 'bar'] }} element={<Example/>} />
Maybe '/example/(foo|bar)/thing?'.
/example/(foo|bar)/thing? would be a valid Express path by the way, if the router switched to that this would work out of the box.