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

Need to pass additional props to the router #17

Closed
Vincz opened this issue Sep 10, 2016 · 3 comments
Closed

Need to pass additional props to the router #17

Vincz opened this issue Sep 10, 2016 · 3 comments

Comments

@Vincz
Copy link

Vincz commented Sep 10, 2016

I'm using onUpdate method on the react-router (to hit analytics).
Currently, there is no way to pass additional properties to the router.
Maybe a new option would be great ?
Something like this in the options:

router: {
    props: {
        onUpdate: () => { analytics.hit(); }    
    }
}
@catamphetamine
Copy link
Owner

Is onUpdate needed only on the client side?

@Vincz
Copy link
Author

Vincz commented Sep 10, 2016

Yes, i think, as there is no real route update on the server side...

@catamphetamine
Copy link
Owner

catamphetamine commented Sep 10, 2016

Implemented in 5.0.0.

{
  on_navigate: (location) => ...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants