score:27

PropTypes.node: any render-able value like numbers and string, that can actually be rendered on screen.

PropTypes.any: any type of value, even those are non-render-able like boolean.

Incase of <div>{true}</div> JSX code,

booleanValue: PropTypes.node will give an error, while booleanValue: PropTypes.any will not give any such error.

score:35

PropTypes are a way to validate the values that are passed in through our props.

node We can pass anything that can be rendered, such as numbers, string, DOM elements, arrays, or fragments that contain them using the React.PropTypes.node.

any type React allows us to specify that a prop must be present, regardless of it's type. We can do this by using the React.PropTypes.any validator.


Related Query

More Query from same tag