Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding support for arrays/regexps as Route paths #4825

Closed
fruchtose opened this issue Mar 23, 2017 · 1 comment
Closed

Consider adding support for arrays/regexps as Route paths #4825

fruchtose opened this issue Mar 23, 2017 · 1 comment

Comments

@fruchtose
Copy link

It looks like react-router's internal implementation relies on path-to-regexp to translate Route paths into regular expressions for matching URLs in matchPath. path-to-regexp currently allows the path argument to be a string, an array of strings, or a regular expression. Currently the docs specify that routing must be done with string paths.

I understand that exposing this implementation detail may not be ideal, but consider that Express supports regular expressions in routes and Koa's docs are transparent about its use of path-to-regexp.

@pshrmn
Copy link
Contributor

pshrmn commented Mar 23, 2017

This was discussed and rejected in #4551.

@pshrmn pshrmn closed this as completed Mar 23, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants