Search code examples
react-nativereact-navigation-v5

React-navigation 5x usage of Stack.Screen screenProps


I want to pass something by screenProps in React-navigation v5.x.x. I am one of the newcomers in react-native. Can anyone help me?


Solution

  • There's no screenProps in React Navigation 5. You can use React's Context feature instead to pass data down the tree without an extra API.

    https://reactnavigation.org/docs/upgrading-from-4.x#global-props-with-screenprops