You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use a Teleporter in SSR context app, you will get a warning because of the useLayoutEffect hook in createTeleporter() function.
Warning: useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and the intended UI. To avoid this, useLayoutEffect should only be used in components that render exclusively on the client. See https://fb.me/react-uselayouteffect-ssr for common fixes.
To Reproduce
Render an app using server-side rendering.
Expected behavior
It should not emit a warning on Node server.
The text was updated successfully, but these errors were encountered:
@slorber I don't think slots / teleporting libs can ever support SSR properly because, for example, react will render the a target in the header before it renders the source in the body.
🐛 Bug Report
If you use a Teleporter in SSR context app, you will get a warning because of the
useLayoutEffect
hook increateTeleporter()
function.To Reproduce
Render an app using server-side rendering.
Expected behavior
It should not emit a warning on Node server.
The text was updated successfully, but these errors were encountered: