<p dir="auto">Occurs in Fiber with multiple instances of the React package (which can't share current owner).</p>
<p dir="auto">So I'm loading a precompiled react file into my server.js and using that to rendertostring.<br>
(there is a very good reason why I'm doing it like this, don't ask about it, that's no part of the issue here)</p>
<p dir="auto">This actually works but the moment you introduce hooks... it all goes to hell. I've tried setting react/react-dom as externals and such. Nothing works. It keeps throwing the same issue.</p>
<ol dir="auto">
<li>There are no mismatching versions</li>
<li>There are no duplicate react versions I can see</li>
<li>The rules of hooks are not broken as far as I know.</li>
</ol>
<p dir="auto">React version: 16.12.0</p>
<h2 dir="auto">Steps To Reproduce</h2>
<ol dir="auto">
<li><a href="https://github.com/Pixelatex/hooks-ssr-issue">https://github.com/Pixelatex/hooks-ssr-issue</a></li>
<li>Yarn build</li>
<li>Yarn serve</li>
<li>Go to localhost:3000 and see it crash, removing the hooks from app.js shows it working.</li>
</ol>
<p dir="auto">Link to code example:</p>
<p dir="auto"><a href="https://github.com/Pixelatex/hooks-ssr-issue">https://github.com/Pixelatex/hooks-ssr-issue</a></p>
<h2 dir="auto">The current behavior</h2>
<p dir="auto">It should render a string with the resulting html.</p>
<h2 dir="auto">The expected behavior</h2>
<p dir="auto">Hooks should just work.</p>