Skip to content

history.isActive #1984

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

Closed
apucacao opened this issue Sep 16, 2015 · 2 comments
Closed

history.isActive #1984

apucacao opened this issue Sep 16, 2015 · 2 comments

Comments

@apucacao
Copy link

Hey folks,

I just upgraded to RC1 and things are generally working great. Thank you :)

I have a question about isActive. I am using classes, and am trying to follow the suggestion History mixin docs and this page.

However it looks like the history object from that I'm creating doesn't have a isActive method. I took a look at the source code the router and it seems that isActive is added by the router itself.

If that's the case and is meant to be that way, then I'm curious about what others are doing.

Thanks,

Alexis

@heyheyjp
Copy link

Mixins don't work with ES6 classes. You'll need to either revert to using React.createClass() for defining components in which you really need to use a mixin, or use some alternative method for making mixins work with ES6 classes.

Useful resources:

@catamphetamine
Copy link

Well, it says for me: TypeError: history.isActive is not a function

Here: https://github.com/rackt/react-router/blob/master/modules/Link.js#L103

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

3 participants