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

fix(confirmLeave): update current route's history blocking after "addRoutes" #359



Copy link

artkravchenko commented Jun 16, 2019


This PR introduces support of usage scenarios when initial route is needed to be location-blocking and loaded partially (without confirmLeave property) on init but it's updated (adding confirmLeave) using addRoutes() later. It's necessary if the following conditions are combined:

  • router related code-splitting is used;
  • SSR is used;
  • only serializable parts of current route's config are sent from the server (such as path property);
  • full implementation of the routes is loaded and applied with subsequent JavaScript chunks;
  • current route must block the navigation (confirmLeave() is present on route's full config).

We use this technique at right now.

Also, @oopscurity/redux-first-router@2.1.2 includes these changes applied on the original repo's master branch.

@artkravchenko artkravchenko requested a review from ScriptedAlchemy as a code owner Jun 16, 2019

This comment has been minimized.

Copy link

ScriptedAlchemy commented Jun 17, 2019

Reviewing today, appreciate the PR!


This comment has been minimized.

Copy link
Contributor Author

artkravchenko commented Jun 19, 2019

@ScriptedAlchemy, absolutely! Let me know how I can improve the PR.

@ScriptedAlchemy ScriptedAlchemy merged commit a8f3bb3 into faceyspacey:master Jul 29, 2019
2 checks passed
2 checks passed
codeclimate All good!
continuous-integration/travis-ci/pr The Travis CI build passed

This comment has been minimized.

Copy link

faceyspacey commented Jul 29, 2019

🎉 This PR is included in version 2.1.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.