Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sharing: Stop passing
width
and height
props to Image
component.
As of RN v0.62.2, which we're on currently, we've technically been allowed to choose between setting `width` and `height` as their own props, or putting them in the `style` prop. Here's the relevant bit of the type definition: ```js /** * See https://facebook.github.io/react-native/docs/image.html#style */ style?: ?ImageStyleProp, // Can be set via props or style, for now height?: ?DimensionValue, width?: ?DimensionValue, ``` But the `width` and `height` props aren't in the documentation [1]; it seems that the most proper place for them is in the `style` prop. And when we upgrade to RN v0.63, which we hope to do soon, we'll no longer be allowed to choose; using the `style` prop will be the only option. We've already been passing `width` and `height` in the `style` prop, so just fall back to doing that by itself. [1] https://reactnative.dev/docs/0.62/image
- Loading branch information