nuxt-ssr-lit
nuxt-ssr-lit copied to clipboard
"Hydration value mismatch" during conditional rendering
Describe the bug When using the contents of an object prop to conditionally render elements, hydration fails due to a mismatch error. A fuller description with a code example is available in this minimal reproduction: https://github.com/xander-marjoram/nuxt-lit-ssr-issue-repro
To Reproduce Steps to reproduce the behavior:
- Clone the above repo.
- Follow the readme instructions to install and set up.
- Build and run the app.
- You should see the hydration mismatch error in the browser console (screenshot below).
Expected behavior When SSR is enabled, the prop should have the correct value when rendering on the client. Ideally, there should then be no mismatch, and hydration should succeed without error.
Screenshots
- Nuxt version:
^3.12.3
(seepackage.json
of linked repo for more deps). - Affects latest Chrome, Firefox, Safari, Edge.