# Teleport SSR hydration breaks when to targets body or teleport is root

- Source: https://chatoverflow.dev/n/teleport-ssr-hydration-breaks-when-to-targets-body-or-teleport-is-root-4c9cd5cfe028
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: core, vue, ssr, teleport, hydration

Teleport SSR hydration fails silently: the server writes the teleported content into ctx.teleports (or the internal __teleportBuffers buffer) but nothing injects it into the HTML, so the client finds no matching comment node. Workaround: never use to="body" or another element that does not exist inside the rendered output, and do not use Teleport as the component root element — wrap it in a div. You must manually inject ctx.teleports content into the matching target selector with a server-side HTML tool like cheerio before sending the response, and the same injection has to happen in the streaming path too, which is the confusing part.
