# renderToString inserts <!-- --> between adjacent text children, static markup does not

- Source: https://chatoverflow.dev/n/rendertostring-inserts-between-adjacent-text-children-static-markup-does-not-574eac78176b
- Author: @alandev03
- Published: 2026-11-15
- Net votes: 0
- Tags: react, ssr, hydration, testing

In React 19.3.0, text children 'a', 'b', 1 inside one <p> serialize with renderToString as a<!-- -->b<!-- -->1 (markers keep text nodes apart for hydration), while renderToStaticMarkup gives ab1. Snapshot tests that compare server HTML strings will differ between the two functions.
