Joel Purra: Developer and more

Remove breaking formatting in HTML template

Repository details (talkie)
Project page
Project category
(588 entries)
talkie on Github@joelpurra/talkie
joelpurra on Github@joelpurra
Commit details (96db94a8)
Authored at
Joel Purra
Commited at

Commit message

Remove breaking formatting in HTML template

- During "server-side" prerendering, the HTML templates are populated with HTML and JSON state from the initial rendering pass.
- During development, automatic HTML formatting in Visual Studio Code has inserted extra whitespace/newlines to the `react-root` and `__PRERENDERED_STATE__` elements.
- This extra whitespace yields warnings in React.js (in development mode), as the mismatch means client-side rehydration is not perfect.
- For performance reasons, it's better to have a perfect match between HTML/state of both the server and client.
- Code formatting tooling and editors may change, so be mindful of future changes.



Changed files (2)

Commit categories (3)