Nested reactivity. Generally you can nest effects or derivations inside themselves. This is important to how Solid renders but I suppose wasn't needed for this simple example.
If you try to subscribe after the inner effect it doesn't track. Change the example to:
createEffect(()=>{createEffect(()=>{log("value is ",value());});log("name is ",name());});
Keep in mind this is just a simple approximation. I don't actually use an array in my libraries and instead just store the out context and then restore it.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey Ryan, great article, I benefit a lot from it, thank you so much.
Q: Why use
context
stack?I replaced the
context
stack, and it words fine. full codeNested reactivity. Generally you can nest effects or derivations inside themselves. This is important to how Solid renders but I suppose wasn't needed for this simple example.
I nested effects, but it also works fine. full code
If you try to subscribe after the inner effect it doesn't track. Change the example to:
Keep in mind this is just a simple approximation. I don't actually use an array in my libraries and instead just store the out context and then restore it.