Closed
Description
Rendering this component throws a cryptic error on the native side because every ART Group should be mounted in a Surface and it gets confused.
'use strict';
var React = require('react-native');
var ReactART = require('ReactNativeART');
var {View} = React;
var {Group} = ReactART;
var ArtBug = React.createClass({
getInitialState: function() {
return {showGroup: true};
},
componentDidMount: function() {
this.setState({showGroup: false});
},
render: function() {
return (
<View>{this.state.showGroup && <Group />}</View>
);
},
});
module.exports = ArtBug;
We should probably throw an error earlier for this case. One way to do it would be to use context to pass down some flag from the Surface and throw if it's not present in the other components.