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

Change API for disposing a route #17

Open
reneviering opened this issue May 15, 2017 · 0 comments
Open

Change API for disposing a route #17

reneviering opened this issue May 15, 2017 · 0 comments

Comments

@reneviering
Copy link
Owner

At the moment you have to add a configuration property dispose which is called just before navigating to another route.

A common pattern for deregistering an event or for disposing something is invoking the return-value of the routehandler function, e.g.:

const routeHandler = () => {

   return () => {
       console.log('dispose.....');
   }
}
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

1 participant