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

Feature request: afterRouteChange and/or onRouteChange options #25

Open
slashwhatever opened this issue May 31, 2018 · 0 comments
Open

Comments

@slashwhatever
Copy link

I frequently run into situations where it would be helpful to know that a route has just changed or is in the process of changing.

Think of something like React's lifecycle methods.

As an example, it might be handy to know that a user has just navigated between two given routes in order to refresh the data held in redux state.

example:

const options = {
  *onRouteChange({ routeParams, nextRouteParams }) {
    if ( routeParams.section === 'user' && nextRouteParams.subsection === 'posts' ) {
          // do something with the params
    }
  }
}
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