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

Accept array as pattern #4159

Closed
wants to merge 1 commit into from
Closed

Accept array as pattern #4159

wants to merge 1 commit into from

Conversation

bkniffler
Copy link

path-to-regexp accepts an array (like in expressjs), but the match.js propTypes allow only for strings.

path-to-regexp accepts an array (like in expressjs), but the match.js propTypes allow only for strings.
@timdorr
Copy link
Member

timdorr commented Nov 8, 2016

Unfortunately, it's not that simple, as we deal with the pattern in multiple ways. See matchPattern for more details. This PropType change isn't sufficient.

@timdorr timdorr closed this Nov 8, 2016
@jedwards1211
Copy link

@timdorr array patterns seem to be working for me though with 4.0.0-alpha.6 -- are there some cases in which they don't work? Array patterns are also critical to only rendering parent routes if child routes match...unless someone has found a better solution than I have.

@esseswann
Copy link

esseswann commented Dec 7, 2016

@jedwards1211 they work with unchanged 4.0.0-alpha.6 for you? Cause for me the don't, unfortunately.

BTW I highly support idea of accepting array pattern

@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 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

Successfully merging this pull request may close these issues.

4 participants