Error AtlasError Documentation and Resolution

React createPortal was called on the server

createPortal was called on the server. Portals are not currently supported on the server. Update your program to conditionally call createPortal on the client only.

React detected createPortal being called during server rendering, which is unsupported because portals require a client-side DOM target.

React error #448rendering
createPortal was called on the server. Portals are not currently supported on the server. Update your program to conditionally call createPortal on the client only.
  • Portal rendering logic runs during SSR.
  • A component assumes document or DOM targets exist on the server.
  • Client-only modal or overlay code is being rendered on the server path.
  1. Only call createPortal on the client where the DOM exists.
  2. Move portal code behind a client-only boundary or effect.
  3. Guard portal rendering until after mount if the target is not available during SSR.
React Docs: Minified React error #448
React error #448 createPortal was called on the server | Error Atlas