unexpected-react
unexpected-react copied to clipboard
Log a warning or fail hard when unexpected-react is imported after react
The documentation clearly states that "The order of require's is important. unexpected-react must be required before react is required."
However if one requires/imports them in the wrong order, instead of failing with a meaningful error message, unexpected-react will start failing with weird assertion errors which might result in several hours long headscratching sessions.
It should actually have a meaningful error message, there's even tests for that. I'll check it out though, you obviously managed to get weird error messages when doing this.