Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Doc mismatch with $effect.tracking() behavior in optimized static blocks #13903

@Conduitry

Description

@Conduitry

Describe the bug

In the example code in the documentation, $effect.tracking() in the template returns false, not true 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

n/a

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions