dillon1000/react

Commit

Adjacent text nodes in SSR should have comments between them despite components (#11109)

* Add a failing test for text nodes within components

* Reset the text node flag only when emitting tags

This ensures we don't reset it when we exit components that return strings.

* Add a failing test for a more complex tree

* Also reset text flag when emitting a footer

This fixes the {'a'}</div>{'b'} case and prevents an unnecessary comment before 'b'.
Browse files
Changed paths2 files
First-parent comparison
M src/renderers/dom/shared/__tests__/ReactDOMServerIntegration-test.js ModifiedM src/renderers/shared/server/ReactPartialRenderer.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…