mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Fix typos
This commit is contained in:
parent
82eec61c45
commit
c4e1396684
2 changed files with 4 additions and 4 deletions
|
|
@ -10,7 +10,7 @@ Stores a single value that can be updated.
|
||||||
|
|
||||||
Created with `source()`.
|
Created with `source()`.
|
||||||
|
|
||||||
# Derived Source
|
## Derived Source
|
||||||
|
|
||||||
A new source composed of other sources.
|
A new source composed of other sources.
|
||||||
|
|
||||||
|
|
@ -46,7 +46,7 @@ Created by:
|
||||||
|
|
||||||
Reactive scopes do track sources and will rerun when those sources update.
|
Reactive scopes do track sources and will rerun when those sources update.
|
||||||
|
|
||||||
New reactive scopes cannot be created within a reactive scope, but stable scopes
|
Reactive scopes cannot be created within a reactive scope, but stable scopes
|
||||||
can.
|
can.
|
||||||
|
|
||||||
## Scope Owners
|
## Scope Owners
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ end
|
||||||
effect(function() text() end)
|
effect(function() text() end)
|
||||||
effect(function() text() end)
|
effect(function() text() end)
|
||||||
|
|
||||||
source(1) -- prints "ran" x2
|
count(1) -- prints "ran" x2
|
||||||
```
|
```
|
||||||
|
|
||||||
To avoid this, you can use `derive()` to derive a new source instead. This will
|
To avoid this, you can use `derive()` to derive a new source instead. This will
|
||||||
|
|
@ -54,7 +54,7 @@ end)
|
||||||
effect(function() text() end)
|
effect(function() text() end)
|
||||||
effect(function() text() end)
|
effect(function() text() end)
|
||||||
|
|
||||||
source(1) -- prints "ran" x1
|
count(1) -- prints "ran" x1
|
||||||
```
|
```
|
||||||
|
|
||||||
`derive()` must also be called within a stable scope, just like `effect()`.
|
`derive()` must also be called within a stable scope, just like `effect()`.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue