gpt4 book ai didi

react-native - react 导航 Stack.Screen screenProps 的 5 倍使用

转载 作者:行者123 更新时间:2023-12-02 00:07:17 25 4
gpt4 key购买 nike

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

最佳答案

React Navigation 5 中没有screenProps。您可以使用React's Context feature而不是在没有额外 API 的情况下将数据向下传递到树中。

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

关于react-native - react 导航 Stack.Screen screenProps 的 5 倍使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60186607/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com