-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
Description
Describe the bug
The demo code at $effect.tracking documentation is outdated as it still uses $effect.active which causes the playground compiler to throw an error:
Error compiling App.svelte
line 2 column 36
The current demo code:
<script>
console.log('in component setup:', $effect.active()); // false
$effect(() => {
console.log('in effect:', $effect.active()); // true
});
</script>
<p>in template: {$effect.active()}</p> <!-- true -->
When updated as below will now compile:
<script>
console.log('in component setup:', $effect.tracking()); // false
$effect(() => {
console.log('in effect:', $effect.tracking()); // true
});
</script>
<p>in template: {$effect.tracking()}</p> <!-- true -->
Reproduction
Or the demo link from the first paragraph of $effect.tracking documentation.
Logs
No response
System Info
Not relevantSeverity
annoyance