Open torbjorn-kvist opened 7 years ago
@Dvidan Sounds good! If you can create a quick PR for this it would be amazing.
Not sure what's the best way yo go about it tho.. Should we have a whitelist/blacklist for props?
Or maybe simply have a higher level props for handling the different components, i.e. containerViewStyles
, imageStyles
(which could just be style), loadingIndicatorStyles
?
Would love to hear some thoughts about it
@kfiroo Not sure either I have gotten it to work by doing _.omit(flattenStyle(style), ['resizeMode', 'tintColor'])
for example. Problem with that is if there is going to be a more Image specific style properties, then there is a need to update the omit each time there is something new.
Using higher level props could also work.
One other alternativ is to import http://facebook.github.io/react-native/docs/imagestyleproptypes.html https://facebook.github.io/react-native/docs/viewstyleproptypes.html
And use lodash 'difference' and then omit the image specific values.
Tested on 1.3.5 and 1.4.0-rc React Native: 0.47
"Warning: Failed prop type: Invalid props.style key
tintColor
supplied toActivityIndicator
."Suggested solutions: