-
Notifications
You must be signed in to change notification settings - Fork 216
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
isActive? #28
Comments
React Router has this module: https://github.com/rackt/react-router/blob/master/modules/isActive.js which could be used to create an |
Hmm.. yeah, it would be great if Do you think this feature falls into scope for this ( |
Yeah I think it falls within the scope of this library. |
You can access history via context and call
https://github.com/rackt/react-router/blob/v1.0.0-rc1/modules/Link.js |
@i4got10 Yes but we'd like to do it inside a selector, based purely on the state in the store. |
Closed by #56 |
@acdlite Awesome! Thanks 😃 Do you happen to know if this method will let us check if a route is active regardless of the query, or does not specifying the query do a strict check for an empty query? Checking if a route is active with any possible query can be useful sometimes. |
Is there a way to test if a specific route is active (similar to the
IsActive
mixin) via the router state in the Redux store (instead of a React component)?I realize one option would be to get the
location.pathname
and check for a certain prefix using aRegExp
, for example, but some kind ofisActive
function would be much cleaner.The text was updated successfully, but these errors were encountered: