lotosbin / react-native-pin-input

react native pin input
MIT License
5 stars 9 forks source link

Style prop optimization #12

Closed donjerick closed 6 years ago

donjerick commented 6 years ago

Getting TypeError: In this environment the sources for assign MUST be an object.This error is a performance optimization and not spec compliant.

Reason:

style={{ padding: 2, margin: 2, borderColor: 'gray', borderWidth: 1, width: 30, height: 30, textAlign: 'center', ...this.props.pinItemStyle }}

Suggested change in index.php :

style={ StyleSheet.flatten([ {padding: 2, margin: 2, borderColor: 'gray', borderWidth: 1, width: 30, height: 30, textAlign: 'center'} , this.props.pinItemStyle ])}

lotosbin commented 6 years ago

@donjerick Thanks!