REEEEE
how to manage global signals interacting with other global signals properly?
The warning is just for informing you that the effect won't be disposed and could lead to some sort of memory leak if you don't know what you're doing AFAIK. Having said that, there is no real issue with doing this and many people prefer to do global signals. Personally, I prefer to encapsulate this sort of information in a context provider if you're going to end up needing to use this in multiple places either a single instance or to create multiple instances
17 replies
<Show> not tracking signals
You can think about it like it's another component you just created and your accessing the reactive property in the body rather than the returned jsx. The same thing would fail if you had a component that just returned
props.value
outside of the jsx28 replies
<Show> not tracking signals
Because it's being read inside jsx which tracks but in the original all you're doing is taking the passed callback and returning the value. The reference to
counter()
doesn't change unless the value in the when
condition also changes28 replies