You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The declared type for prop textMessage is not correctly working with memoized components supplied as prop for textMessage.
The most proper type should be PropTypes.element instead of PropTypes.func.
Additionally, bottom could be set more specifically instead of just declaring them as object.
SnackbarComponent.propTypes = {
left: PropTypes.number,
right: PropTypes.number,
top: PropTypes.number,
- bottom: PropTypes.number,+ bottom: PropTypes.oneOfType([PropTypes.number, PropTypes.instanceOf(Animated.Value)]),
visible: PropTypes.bool,
actionText: PropTypes.string,
- textMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),+ textMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
position: PropTypes.oneOf(['bottom', 'top']), // bottom (default), top
// eslint-disable-next-line react/no-unused-prop-types
autoHidingTime: PropTypes.number, // How long (in milliseconds) the snack bar will be hidden.
containerStyle: ViewPropTypes.style,
messageStyle: Text.propTypes.style,
actionStyle: Text.propTypes.style,
};
The text was updated successfully, but these errors were encountered:
balsick
added a commit
to balsick/react-native-snackbar-component
that referenced
this issue
Jul 17, 2023
The declared type for prop
textMessage
is not correctly working with memoized components supplied as prop fortextMessage
.The most proper type should be
PropTypes.element
instead ofPropTypes.func
.Additionally,
bottom
could be set more specifically instead of just declaring them asobject
.The text was updated successfully, but these errors were encountered: