Trying to get a clear answer on how to assign propTypes for React Components passed as a prop.
Is it even necessary that I check this prop type, and if so, how would I go about using proptypes for the following exapmle:
import React from "react"; import PropTypes from "prop-types"; import styles from "./NavIcons.module.css"; function NavIcons(props) { return ( <div className={styles.navIcons}>{props.children}</div> ); } NavIcons.propTypes = { children: // WHAT GOES HERE? }; export default NavIcons;
children: PropTypes.node.isRequired