Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

navigation.getChildNavigation is not a function

Getting error after i update react-navigation package with > 2.2.5 (android/ios)

RN : 0.55.4
react : 16.3.1
react-navigation : 2.3.0
redux: 3.7.2
react-navigation-redux-helpers : 1.1.2

everything is working fine before updating react-navigation version

similar issue on git hub but still not resolved https://github.com/react-navigation/react-navigation/issues/4481

my navigation structure

StackNavigation
              |
            home 
              |
            login
              |
              .
              .

I have only one navigation no nesting

enter image description here

like image 216
Jigar Avatar asked Jun 12 '18 08:06

Jigar


2 Answers

Two minutes ago i had the same problem. Just downgrade react-navigation version to 2.2.0, this fixed my problem.

like image 158
Yanislav Konaschuk Avatar answered Oct 20 '22 03:10

Yanislav Konaschuk


Steps to resolve

  1. Upgrading react-navigation-redux-helpers in the package.json to version 2.0.8.
  2. Do not pass nav navigation prop down to your appNavigator, as in React-Navigation@latest persist its on state.

So instead of doing this

<Provider> <AppNavigation navigation={navigation}/> <Provider>

do this

<Provider> <AppNavigation/> <Provider>

like image 33
Rajat Gupta Avatar answered Oct 20 '22 03:10

Rajat Gupta