I am getting warning as" Warning: Failed prop type: Component: prop type props is invalid; it must be a function, usually from the prop-types package, but received object"
my code is:
const { history } = props.props
history.push('/next');
Component.propTypes = {
props: {
history: PropTypes.object,
},
}
Component.defaultProps = {
props: {
history: PropTypes.object,
},
}
My functionality working fine but getting this console error Can someone help me to resolve this warning?