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
I was just reading about "Using context with state" on https://svelte.dev/docs/svelte/context#Using-context-with-state and I tried out the linked demo ... but it didn't work! Clicking increment does not update the counter in the Child component. What am I missing? As far I can tell, everything done in the demo looks correct and "should" work.
So as far I can tell, this is a Svelte bug, yes?
And if it's not a Svelte bug, then it would be very instructional to find out what is wrong with this usage.
Interestingly, adding $inspect(counter) to Child.svelte is enough to trick it into working. But that's obviously not the proper solution.