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

RegExp param for router.isActive #3375

Closed
Rokt33r opened this issue Apr 25, 2016 · 1 comment
Closed

RegExp param for router.isActive #3375

Rokt33r opened this issue Apr 25, 2016 · 1 comment

Comments

@Rokt33r
Copy link

Rokt33r commented Apr 25, 2016

router.isActive(/^\/hello/) would be great to deal with the problem like #3277
It makes the method much flexible and doesn't seem to destructive.

I know #3277 is due to wrong structure of routes.
But, it is quite annoying to take care about it when prototyping app.

I, therefore, prefer to use this.props.location.pathname.match(/^\hello/) for my new app.

@taion
Copy link
Contributor

taion commented Apr 25, 2016

You can use whatever semantics you want in user space – checking the pathname explicitly like that is fine, if it's what your application requires.

@taion taion closed this as completed Apr 25, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jan 22, 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