ronak301/react-native-submit-button

Failed prop type: checker is not a function + 2 other warnings

Closed this issue · 1 comments

ixje commented

3 warnings are thrown using version 1.0.5

Warning 1
Console shows the warning:

Failed prop type: checker is not a function

caused by
buttonState: PropTypes.oneOfType( [ 'normal', 'success', 'error' ] ), (source)

change oneOfType to oneOf to solve.

Warning 2

Warning: Failed prop type: SubmitButton: prop type errorColor is invalid; it must be a function, usually from React.PropTypes.

by errorColor : PropTypes.color, (source)
apparently .color isn't valid (anymore?)
For now I commented it out, but could be checked using e.g. https://github.com/benwiley4000/react-extra-prop-types/blob/master/lib/validators/isColor.js

Warning 3

Warning: Failed prop type: Invalid prop opacity of type object supplied to AnimatedCircularProgress, expected number.
Bad object: {
"backgroundColor": "transparent",
"position": "absolute",
"top": 0,
"left": 0,
"opacity": 0
}

Triggered by:

const opacity = animatedValue.interpolate( {
inputRange : [ 0, 0.99, 1, 1.1, 2 ],
outputRange: [ 0, 0, 1, 0, 0 ],
extrapolate: 'clamp'
} );
return (
<AnimatedCircularProgress
ref='circularProgress'
size={height}
width={4}
fill={fill}
tintColor={primaryColor}
backgroundColor={AnimatingCicleBackgroundColor}
rotation={0}
tension={20}
style={{backgroundColor: 'transparent', position: 'absolute', top: 0, left: 0, opacity: opacity}}

by caused by: https://github.com/bgryszko/react-native-circular-progress/blob/3704067904844053a2a955348f884cdef1f64cbb/src/AnimatedCircularProgress.js#L58

All warnings are fixed in latest Version. (1.1.0)