Skip to content

"Cannot read property 'push' of undefined" when mounting router for the second time #172

@danielweinmann

Description

@danielweinmann

I have an app that uses navigation only in a small part of it and for the rest it relies on figuring what components to render by state, using redux.

Today I replaced NavigatorIOS for routers in the main place where I used navigation, and at first it seemed to work perfectly. But when I mounted for the second time the navigation flow, after coming from other part of the app that does not use routers, I got the following error:

simulator screen shot feb 4 2016 3 51 20 am

I created a simplified scenario where I can simulate the problem here: https://gist.github.com/danielweinmann/8ab67efdf51e773f4a59

To simulate the problem, just run the example and do the following:

  • Click on "Next"
  • Click on "Sign in"
  • Click on "Sing out"
  • Click on "Next" again.

I would gladly contribute with a fix for this problem, but I couldn't figure it out so far.

Anyone has any thought on it? @aksonov, can you enlighten me?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions