React 18 Bug: react-dom/server "Detected multiple renderers..." if preceeded by react-test-renderer #22796
Labels
React 18
Bug reports, questions, and general feedback about React 18
Status: Unconfirmed
A potential issue that we haven't yet confirmed as a bug
Type: Bug
React version: 18.0.0-beta-149b420f6-20211119
Steps To Reproduce
react-test-renderer
(wrapped in act)react-dom/server
Link to code example: https://codesandbox.io/s/react-18-react-test-renderer-react-dom-server-forked-lbs7j?file=/package.json:189-219
The current behavior
renderToString
results in the console error "Warning: Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."The expected behavior
No error like in React 17 (https://codesandbox.io/s/react-17-react-test-renderer-react-dom-server-yr8gx).
Considering all renders are wrapped in their corresponding
act
I don't expect that I'm concurrently rendering.I tried to understand when we reset the
rendererSigil
(responsible for checking if we "concurrently rendering") is reset and it seems like we never reset it but only initialize it when creating the context (createContext
)So it either seems like multiple renderers in the same module are not supported anymore or the reset is missing.
The text was updated successfully, but these errors were encountered: