ptomasroos / react-native-tab-navigator

A tab bar that switches between scenes, written in JS for cross-platform support
MIT License
2.4k stars 416 forks source link

selected={this.state.selectedTab === 'home'} is error #161

Closed zaihuishou closed 6 years ago

zaihuishou commented 7 years ago

我的环境如下: react-native-cli: 2.0.1 react-native: 0.49.3 selected={this.state.selectedTab === 'home'} 这句代码无法执行报错如下,我吧这句代码注释就能运行

Cannot add a child that doesn't have a YogaNode to a parent without a measure function! (Trying to add a 'ReactVirtualTextShadowNode' to a 'LayoutShadowNode') addChildAt ReactShadowNode.java:181 setChildren UIImplementation.java:398 setChildren UIManagerModule.java:310 invoke Method.java invoke JavaMethodWrapper.java:363 invoke JavaModuleWrapper.java:162 run NativeRunnable.java handleCallback Handler.java:789 dispatchMessage Handler.java:98 dispatchMessage MessageQueueThreadHandler.java:31 loop Looper.java:164 run MessageQueueThreadImpl.java:194 run Thread.java:764

OOMROO commented 6 years ago

我也遇到了相同的问题

Answer000 commented 6 years ago

请问是解决的

ptomasroos commented 6 years ago

Will close since this issue is more than a year, feel free to a open a new if this is still a issue.