Reactivity from a hook passed down to a component
Hi, I am trying to create a hook that returns a discriminated union which is then passed to a helper component to handle some common states, however while this works for the first render, it doesn't appear to update on changes.
Repro URL: https://playground.solidjs.com/anonymous/7e285c43-b1d0-4a35-adda-35c0ba825294
You can click the button to retrigger the hook and return a new result.
I can see from the
createEffect
's that the components are subscribed to changing value, but if you keep clicking the button the new value is not rendered on the page.
If you uncomment line 20, the changing state does appear to cause it to update properly after that
Thanks for any help!Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
2 Replies