Ajackster/react-native-global-props

Need to check if "style" prop is an array

Opened this issue · 5 comments

this.props = { ...this.props, style: [customProps.style, this.props.style] };

when this.props.style is an array, this will not work properly. In my case, it ignores customProps.style

Yes. Need to check for both customProps.style and this.props.style.

@mahesh1996 while you're at it, can you take a look at #10 ? I suspect they're related. Thank you!

@thomasttvo Tested on react-native 0.51. It works fine as Text can accept style object or recursive array of style objects.

@mahesh1996 I got it on some elements too, but have deleted the code, will let you know if I happen to reproduce it.

Also, make sure If you are using native-base in your project, then Text is imported from react-native.