-
Notifications
You must be signed in to change notification settings - Fork 49.9k
Description
People lose hours of work debugging a simple issue: two versions of React being loaded at the same time.
gaearon/react-hot-loader#32 (comment)
KyleAMathews/coffee-react-quickstart#10 (comment)
gaearon/react-document-title#1 (comment)
clayallsopp/react.backbone#26
Because there is no warning right away when this happens, they usually discover the problem through invariant violations. Some of them are descriptive (e.g. Uncaught Error: Invariant Violation: The handler for Route "hello" must be a valid React component) and I think I even saw warning that said something like "check if two copies of React are loaded", but some are really cryptic: Invariant Violation: addComponentAsRefTo(...): Only a ReactOwner can have refs....
Is there a reason why we don't want to warn right away when two copies of React are loaded?