jwplayer / jwplayer-react-native

MIT License
32 stars 9 forks source link

[BUG] style prop does not conform to standard View style prop #80

Open dominictobias opened 3 months ago

dominictobias commented 3 months ago

Describe the bug

Minor but the prop and handling of style should be style?: StyleProp<ViewStyle> | undefined

This allows the style to be an array like other RN Views.

We can spread the style into a new object each render but this is less efficient as React caches static styles so style={[staticStyles, { ...dynamicStyles... }] is more efficient than spreading and the static styles don't need to get sent over the JS->Native bridge every time.