Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在反应原生项目中使用反应导航。我有一个使用navigationOptions 的带有标题的组件。
我正在尝试访问道具以设置动态名称,但似乎它们未定义。我似乎无法在 navigationOptions 对象中访问它们。有什么线索吗?
我意识到这是一个老问题,但为了其他人在这里徘徊寻求帮助,你应该看看这里的state文档setParams:
state
setParams
https://reactnavigation.org/docs/navigation-prop.html