SSR, Reactivity of Signals on onMount

Hey guys, I've got couple of signals in the view, which are strings and I'm sending default values via SSR, then on onMount, I'm changing values of these signals. If I put console log inside createEffect, I see that values are changed, but it's not being changed in the view. Also, if I add timeout of signal updates in onMount, for like 200-300ms, I see that values change in the view as well. How can I make it work, so updating signals in onMount, will update values in the view as well?
5 Replies
thetarnav
thetarnav14mo ago
GitHub
Hydration doesn't see the DOM diff · Issue #1716 · solidjs/solid
Describe the bug Hi, I ran into issue with solidjs hydrate(), it doesn't see changes in the DOM between server/client render. I use 2 IoC containers (inversifyjs) and code see the changes (crea...
thetarnav
thetarnav14mo ago
Updating things onMount is the way
aquarazorda
aquarazorda14mo ago
@thetarnav as I mentioned, it doesn’t help. I need to add a timeout in onMount, in order it to work
thetarnav
thetarnav14mo ago
ah your right that's odd normally onMount should be enough
aquarazorda
aquarazorda13mo ago
I have a big language json file, which I'm storing inside store and then I've got a function, where you pass the key and it returns memoized proxy of this store value. Everything works fine, except for the hydration part. 🥺