I have the following Tab Navigator in my React Native app, using React Navigation v6:
<Tab.Navigator>
<Tab.Screen name="Screen1" component={Screen1}/>
<Tab.Screen name="Screen1" component={Screen2}/>
</Tab.Navigator>
I want to pass a prop called prop1 that will be accessible in each screen. How do I do this?
You can do this by moving the component from the
componentprop to become a child of the screen. Example:Official doc here