transitionTo has empty routerState
See original GitHub issueVersion
Dependency | Version |
---|---|
react-router-native | master |
react-router | 3.0.0-alpha.1 |
react-native | 0.29.0-rc.2 |
Expected Behavior
transitionTo
should work.
Actual Behavior
It throws because routerState
is an empty object. This makes the code routes.length - 2
in getActiveParentRouteType
fail, because routes
is undefined (destructured from routerState
).
I suspect this has something to do with the recent refactorings?
By putting in some console.logs
i’ve found out that syncRouterState
is called after transitionTo
, which explains why the routerState
is still set to its initial value of {}
.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Angular-ui-router state.transitionTo routes to an empty:id ...
This should make it work, but you should be using the go() method as transitionTo is a low-level function since 0.2.0. $state.go('users.me', {'id':...
Read more >$state.current is sometimes 'empty' · Issue #1627 · angular-ui ...
Now I just need to figure out why the state is empty. ... state of the application pending a successful transition to the...
Read more >Class: Router - Oracle
The router is designed to simplify writing navigation for Single Page ... is undefined or an empty string, go transition to the default ......
Read more >Empty-path routes | Angular Router - Packt Subscription
So the result of all this is the following router state: Empty path routes can have children, and, in general, behave like normal...
Read more >Declarative Routing with GoRouter 5 (Flutter) - YouTube
GoRouter is a declarative routing package for Flutter, and in this video, you'll learn how to use it with a simple step-by-step Flutter ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll try putting up a repro later. 👍🏻
Woohoo!🎉