无论如何,react-native-tab-view是否在标签可见/单击之前不呈现标签?
链接:https://github.com/react-native-community/react-native-tab-view
答案 0 :(得分:0)
如果有帮助,我做了这样的事情:
renderScene = ({ route }) => {
if (route.key == 'scene0' && this.state.index == 0) {
return <Scene0 />;
}
if (route.key == 'scene1' && this.state.index == 1) {
return <Scene1 />;
}
if (route.key == 'scene2' && this.state.index == 2) {
return <Scene2 />;
}
这允许我做的是控制何时安装组件,这仅在屏幕处于活动状态时进行。