react-native-root-toast icon indicating copy to clipboard operation
react-native-root-toast copied to clipboard

Unexpected view type nested under text node

Open V1sk opened this issue 7 years ago • 0 comments

wechatimg104

I got this error on:

"react": "16.3.1",   
"react-native": "0.55.3",  
"react-native-root-toast": "^3.0.1",   

And i found the error code at:

react-native-root-toast/lib/ToastContainer.js

The "Text" node can not has another child node:

render(){
     ...
     <Text style={[
           styles.textStyle,
           props.textStyle,
           props.textColor && {color: props.textColor}
      ]}>
            {this.props.children}
    </Text>
    ...
}

When I change the "Text" node to "View", My App works.

    <View>
          {this.props.children}
    </View>

V1sk avatar May 11 '18 01:05 V1sk