React-navigation 5x 使用 Stack.Screen screenProps

Roa*_*Roa 2 react-native react-navigation-v5

我想screenProps在 React-navigation 中传递一些东西v5.x.x。我是 react-native 的新人之一。谁能帮我?

sat*_*164 6

screenPropsReact Navigation 5 中没有。您可以使用React 的 Context 功能来代替在树中传递数据,而无需额外的 API。

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