Closed jasperdunn closed 5 years ago
eslint-plugin-import
can check the import for you; simply evaluating the module in tests would immediately tell you what happened.
propTypes aren't the only thing you should be using for quality :-)
You're a legend @ljharb thanks
This happened to me a few weeks ago. Very silly mistake, I'm sure its happened to other people too.
I had imported a function that didn't exist, and it took me a good half an hour to find out why my app was broken, no errors, the page just wouldn't render anything.
here is the silly code that caused the issue:
of course there is no
shapeOf
function exported from prop-types 😜it would be nice if the propTypes interpreter checked if the value actually existed