标签: react-native
我需要的是触发onPress的{{1}}方法而不点击它。
onPress
这是我的代码:
ActionButton
答案 0 :(得分:1)
您可能希望按照此答案中的说明操作:How can I trigger a tabItem onPress within a component using React Native?
不要试图调用onPress本身,只需将onPress prop设置为函数并在需要的地方调用该函数。不需要乱搞refs或类似的东西。