Open Conduitry opened 1 week ago
Per Rich, maybe we want to change the behavior of $effect.active()
here, rather than trying to document the current behavior. The only cases where this would matter would be toy ones where the user is only calling $effect.active()
in a given node in the template.
Describe the bug
In the example code in the documentation,
$effect.active()
in the template returnsfalse
, nottrue
as advertised. This is seemingly because the render effect is optimized away because that node has no dynamic content.I don't know which behavior is more correct. Probably the current one? The current behavior is a bit more confusing to document, though.
Reproduction
https://svelte.dev/docs/svelte/$effect#$effect.tracking
Logs
No response
System Info
Severity
annoyance