Open torbjorn-kvist opened 7 years ago
@Dvidan Thanks so much for this Maybe we can use something like:
const ImageStylePropTypes = ReactNative.Image.propTypes.style;
Would that work? (sorry, I'm not able to test it right now)
It would remove the coupling with @providesmodule
@kfiroo Will try and comeback and see if it works. Not able to try right away, its close to midnight in Sweden at the moment but will try in the morning :)
@kfiroo
ReactNative.Image.propTypes.style
is a function and can't be used that way.
An alternativ way is to use an list of excluded style props, there are three that are unique for Image at the moment.
_.omit(flattenStyle(style), ["resizeMode", "tintColor", "overlayColor"])
Solves #78
Using two modules from the react native core, to make a difference between a ViewStylePropTypes and ImageStylePropTypes.
This will break if React Native stops using @providesModule, ViewStylePropTypes and ImageStylePropTypes isn't exposed via 'react-native'.