-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deep into child router after actions (fix for #110)
- Loading branch information
Pavlo Aksonov
authored and
Pavlo Aksonov
committed
Jan 13, 2016
1 parent
576ae2e
commit bb6b965
Showing
1 changed file
with
7 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bb6b965
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't dug into this much but this breaks subrouters for me
bb6b965
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 nested routers break
getting error:
Cannot find router for route="xxx" current router=undefined
bb6b965
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
combined both ways (before and after), please check now. We really need to add unit tests, who could do it, it will be very helpful...
bb6b965
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good and yes I can look into some simple unit tests on the example project
bb6b965
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll check out the fix once you publish to npm
bb6b965
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bb6b965
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nested routers are no longer an issue, but #110 appears to still be an issue
bb6b965
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im still running into issues with the 'deep into child router' in both places. For me the use case is:
Consider the normal use case of an end user:
Open app, see splash screen, see login scene, type credentials and login, see dashboard, logout, see login scene. If I were to attempt to do any routing from then on (such as navigating to the create account scene which is also a Login Route) the app will crash. The issue is that at the end of the second 'deep into child router' block after the last transition (going back to the login scene) the currentRouter points to the FIRST LoginContainer router whereas it should point to the top level router as far as I can tell. The reason I emphasize first is that since I first mounted the login scene, then transitioned to the app container and the dashboard app scene, the first LoginContainer has been unmounted and so any navigator refs it has are garbage.
For me simply commenting out the second block is enough to fix the issue and since it apparently doesn't fix #110 according to @MITDelian it may be worth removing it altogether; however, in future modifications please consider the above use case, thanks!