<p dir="auto">TL;DR: I propose we create a simple guard around doubly-including React, which can cause issues if different blocks work with different instances of <code class="notranslate">React</code>.</p>
<p dir="auto">I understand this invariant isn't going to matter to everyone, but I've at two points in so many weeks fixed a bug on a co-worker's project because they were accidentally including React twice in the browser: one from a Browserify bundle, and once from a standalone <code class="notranslate">&lt;script&gt;</code>.</p>
<p dir="auto">People lose hours of work debugging a simple issue: two versions of React being loaded at the same time.</p>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="46378264" data-permission-text="Title is private" data-url="https://github.com/gaearon/react-hot-loader/issues/32" data-hovercard-type="issue" data-hovercard-url="/gaearon/react-hot-loader/issues/32/hovercard?comment_id=60043061&amp;comment_type=issue_comment" href="https://github.com/gaearon/react-hot-loader/issues/32#issuecomment-60043061">gaearon/react-hot-loader#32 (comment)</a><br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="39042379" data-permission-text="Title is private" data-url="https://github.com/KyleAMathews/coffee-react-quickstart/issues/10" data-hovercard-type="issue" data-hovercard-url="/KyleAMathews/coffee-react-quickstart/issues/10/hovercard?comment_id=50655116&amp;comment_type=issue_comment" href="https://github.com/KyleAMathews/coffee-react-quickstart/issues/10#issuecomment-50655116">KyleAMathews/coffee-react-quickstart#10 (comment)</a><br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="46525433" data-permission-text="Title is private" data-url="https://github.com/gaearon/react-document-title/issues/1" data-hovercard-type="issue" data-hovercard-url="/gaearon/react-document-title/issues/1/hovercard?comment_id=60241045&amp;comment_type=issue_comment" href="https://github.com/gaearon/react-document-title/issues/1#issuecomment-60241045">gaearon/react-document-title#1 (comment)</a><br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="38944738" data-permission-text="Title is private" data-url="https://github.com/clayallsopp/react.backbone/issues/26" data-hovercard-type="issue" data-hovercard-url="/clayallsopp/react.backbone/issues/26/hovercard" href="https://github.com/clayallsopp/react.backbone/issues/26">clayallsopp/react.backbone#26</a></p>
<p dir="auto">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. <code class="notranslate">Uncaught Error: Invariant Violation: The handler for Route "hello" must be a valid React component</code>) and I think I even saw warning that said something like "check if two copies of React are loaded", but some are really cryptic: <code class="notranslate">Invariant Violation: addComponentAsRefTo(...): Only a ReactOwner can have refs...</code>.</p>
<p dir="auto">Is there a reason why we don't want to warn <em>right away</em> when two copies of React are loaded?</p>