Closed
Description
It would be cool to be able to get warnings for typoed or otherwise extraneous props passed to a component, similar to how React.DOM
warns if you pass class
when you meant className
.
With PropTypes.shape
you could probably even ensure deep validity of the passed data. This would not only be useful for finding bugs, but also for optimizing hot components by making sure the shapes are aligned.
Obviously this would need some sort of opt-in, like propTypes.