Skip to content

Commit

Permalink
Merge pull request #83 from subpopular/patch-2
Browse files Browse the repository at this point in the history
remove router transition hook when unmounting
  • Loading branch information
erikras committed Jul 31, 2015
2 parents d0ebcf1 + f3b8bc0 commit c460439
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/views/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ class App extends Component {

componentWillMount() {
const {router, store} = this.context;
router.addTransitionHook(createTransitionHook(store));
this.transitionHook = createTransitionHook(store);
router.addTransitionHook(this.transitionHook);
}

componentWillUnmount() {
const {router, store} = this.context;
router.removeTransitionHook(this.transitionHook);
}

handleLogout(event) {
Expand Down

0 comments on commit c460439

Please sign in to comment.