unexpected-react icon indicating copy to clipboard operation
unexpected-react copied to clipboard

Log a warning or fail hard when unexpected-react is imported after react

Open salomvary opened this issue 5 years ago • 1 comments

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.

salomvary avatar Sep 22 '20 14:09 salomvary

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.

bruderstein avatar Sep 23 '20 09:09 bruderstein