-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
We started a new project for React 19 and decided to use your library. However, the PropTypes.node is giving us issues. It is giving this error Warning: Failed prop type: Invalid prop 'children' supplied to 'Component', expected a ReactNode.. This is happening because i didn't pass any children to it, but it is not marked as required so it should not be doing this. I have posted a sample below that should allow you to reproduce it if you use that component and don't pass any children:
import PropTypes from 'prop-types';
const Component = ({ children, text }) => {
return (
<div>{children}</div>
);
}
Component.propTypes = {
children: PropTypes.node,
text: PropTypes.string
}
export default Component;
Metadata
Metadata
Assignees
Labels
No labels