根据
this教程,这是我用作反应基础组件作为侧栏组件的组件,它的工作非常好,但是当我从< Text>更改列表项时问题就出现了.到< Button>
import { Text,Container,Header,Content,List,ListItem,TextBody,Button } from 'native-base'; import { StackNavigator,DrawerNavigator } from 'react-navigation' export default class SideBar extends Component { render() { return ( <Content style={{ backgroundColor: '#ffffff' }}> <Container> <Content> <List> <ListItem> <Text>First</Text> </ListItem> <ListItem> <Text>Secount</Text> </ListItem> <ListItem> <Text>Third</Text> </ListItem> </List> </Content> </Container> </Content> ); } }
我收到此错误:
cant add a child that doesn’t have a YogaNede to parent without the
measure function !(Trying to Add a ‘ReactRawTextshadow’ to a
‘LayoutShadowNode’ )
根本无法理解这个错误,并没有在网上看到任何关于它的事情!
> Cannot add a child that doesn't have a YogaNode to a parent without a > measure function! (Trying to add a 'ReactRawTextShadowNode' to a > 'LayoutShadowNode') addChildAt > ReactShadowNodeImpl.java:199 addChildAt > ReactShadowNodeImpl.java:54 setChildren > UIImplementation.java:472 setChildren > UIManagerModule.java:436 invoke > Method.java invoke > Method.java:372 invoke > JavaMethodWrapper.java:374 invoke > JavaModuleWrapper.java:162 run > NativeRunnable.java handleCallback > Handler.java:739 dispatchMessage > Handler.java:95 dispatchMessage > MessageQueueThreadHandler.java:31 loop > Looper.java:135 run > MessageQueueThreadImpl.java:194 run > Thread.java:818