[SOLVED]-REACTJS PROPERTIES VALIDATION-REACTJS
REACTJS PROPERTIES VALIDATION-REACTJS
what is the purpose of having the props specification inside the brackets at the class definition <{...}>?
to define what are the props the component can take, for static analysis and error reporting for required props if they are not passed.
is this available also in normal reactjs?
yes (you’ll have to add flow or typescript to your project)
will that check the passed properties format. if so, why do i need proptypes here??
yes, some times where the type of the props can’t be inferred at compile time, then it would be useful to see any warnings generated from using proptypes
.