PropTypes have been removed from React Native (react-native-community/discussions-and-proposals#29). Most of Shoutem has been updated to take this into account, but some areas have been missed.
For example, in ImagePreview, line 87 exports a source propType for the component like so:
source: Image.propTypes.source
Which of course fails with a TypeError: Cannot read properties of undefined (reading 'source') error. The Shoutem Image component has been updated to use ImagePropTypes from the deprecated-react-native-prop-types package, avoiding these issues.
There are 2 potential solutions:
- Update ImagePreview to use the Shoutem Image component instead of the react-native component.
- Update ImagePreview to use
ImagePropTypes from deprecated-react-native-prop-types
What is the preferred solution for the shoutem team here?
PropTypes have been removed from React Native (react-native-community/discussions-and-proposals#29). Most of Shoutem has been updated to take this into account, but some areas have been missed.
For example, in
ImagePreview, line 87 exports asourcepropType for the component like so:source: Image.propTypes.sourceWhich of course fails with a
TypeError: Cannot read properties of undefined (reading 'source')error. The ShoutemImagecomponent has been updated to useImagePropTypesfrom thedeprecated-react-native-prop-typespackage, avoiding these issues.There are 2 potential solutions:
ImagePropTypesfromdeprecated-react-native-prop-typesWhat is the preferred solution for the shoutem team here?