Reputation: 487
Navigation.setRoot({
root: {
stack: {
children: [s
{
component: {
name: `Danapay.${screen}`,
passProps: {},
},
},
],
},
},
});
Through a TypeError: null is not an object (evaluating 'this.nativeCommandsModule.setRoot') in react native navigation
Upvotes: 0
Views: 127
Reputation: 150
It may be caused by a typo in your code:
stack: {
children: [s // <-- This should not be here
{
component: {
name: `Danapay.${screen}`,
passProps: {},
},
},
],
},
Upvotes: 1