Open mattersj opened 1 week ago
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.
https://github.com/user-attachments/assets/5f2d995d-344e-4282-adec-ead7257fde2c
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.