You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes transitions may cause missing elements after hydration, especially if a component renders a signal that changes during the rendering process, like in the attached example. Commenting out startTransition wrapper in I18nProvider.tsx fixes the issue.
Pay your attention to Parent and Child components and what they're supposed to render.
You can also refresh the page a few times to see that initially an expected output is rendered on the server but eventually Child component's content is vanished after hydration.
It's worth mentioning that I just stumbled upon another yet similar bug (setup is similar to one in a repro but now I'm using https://github.com/solidjs-community/solid-primitives/tree/main/packages/i18n) where changing a locale during rendering may cause unstable output - sometimes t returns en translation even though a language was explicitly set to fr in the parent component, and sometimes it returns the right translation accounting fr language.
I still haven't managed to get a minimal reproducible example (without a library) and I have some doubts this issue is directly related to Solid but going to leave it here just for additional info that may help.
Describe the bug
Sometimes transitions may cause missing elements after hydration, especially if a component renders a signal that changes during the rendering process, like in the attached example. Commenting out
startTransition
wrapper inI18nProvider.tsx
fixes the issue.Your Example Website or App
https://stackblitz.com/edit/github-a26mtb?file=src/app.tsx,src/components/I18nProvider.tsx,src/components/Parent.tsx,src/components/Child.tsx
Steps to Reproduce the Bug or Issue
Expected behavior
A correct output from Parent & Child components.
Screenshots or Videos
Platform
Additional context
The issue is only reproducible when using SSR.
The text was updated successfully, but these errors were encountered: