Closed theneverstill closed 8 years ago
Thanks for pointing out on the issue. It's definitely should be added to UIExplorer to test that use case before release. Will fix tomorrow.
Added example to UIExplorer -> View.
Temporary, fix that bug by almost reverting this code.
Commit 52f89c727ae60641beafad0fb5ec8bad7106248b broke background color on render updates.
Steps to repeat:
Create a view:
<View style={{backgroundColor: this.state.backgroundColor}}/>
The view will render correctly on first render, but all subsequent renders triggered by changing this.state.backgroundColor will fail.
Instead of changing the view's background color, it appears to be changing the background color of a mysterious view 'behind' the view. This can be observed by adding a border radius to the view.
this.styles = StyleSheet.create({ container: { borderRadius: (this.props.size / 2), borderWidth: 1, height: this.props.size, width: this.props.size } });
<View style={[this.styles.container, {backgroundColor: this.state.backgroundColor}]}/>
On updates to the borderRadius example, you'll see that the area outside of the border radius gets updated.