Reputation: 437
I have tried many times to get initialParams
with this.props.navigation.state.params
. It wasn't helpful. Help me please how to get these params.
<Stack.Screen name="FromMainScreenToSubCats" component={FromMainScreenToSubCats} initialParams={{catId:1 , title:'Filmler'}} />
Upvotes: 1
Views: 7841
Reputation: 10143
You can access params with this.props.route.params
https://reactnavigation.org/docs/en/upgrading-from-4.x.html#separate-route-prop
Upvotes: 8