question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

transitionTo has empty routerState

See original GitHub issue

Version

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:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jonathanglasmeyercommented, Jul 5, 2016

I’ll try putting up a repro later. 👍🏻

0reactions
jonathanglasmeyercommented, Jul 10, 2016

Woohoo!🎉

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found