6

I'm using wix react native navigation,it works before adding redux.

Navigation.registerComponent('navigation.playground.WelcomeScreen', () => 
AuthScreen);
Navigation.events().registerAppLaunchedListener(() => {
  Navigation.setRoot({
    root: {
      component: {
      name: "navigation.playground.WelcomeScreen"
      }
    }
  });
});

when I add redux,

const store=configureStore()
Navigation.registerComponent('navigation.playground.WelcomeScreen', () => 
AuthScreen,store,Provider);
Navigation.events().registerAppLaunchedListener(() => {
  Navigation.setRoot({
    root: {
      component: {
      name: "navigation.playground.WelcomeScreen"
      }
    }
   });
 });

I'm getting the error Object is not a function(evaluating 'concreteComponentProvider()')

Arjun sr
  • 161
  • 2
  • 10

1 Answers1

20

If you are using the newest version of react-native-navigation, it's probably because you used registerComponent instead of registerComponentWithRedux.

Try changing your code to:

Navigation.registerComponentWithRedux('navigation.playground.WelcomeScreen', () => AuthScreen,Provider,store);

And see if it works.

P.S: In the new version, you have to put the provider before the store.

Source

Ray
  • 9,184
  • 3
  • 27
  • 44