mirror of
https://github.com/littensy/charm.git
synced 2026-10-20 17:51:37 +00:00
docs: fix typo
This commit is contained in:
parent
fa2fce090b
commit
39a5b67d9c
1 changed files with 1 additions and 1 deletions
|
|
@ -181,7 +181,7 @@ Because `effect` implicitly tracks all atoms read within the callback, it might
|
|||
|
||||
#### Caveats
|
||||
|
||||
- **If your effect calls its own cleanup function, use the `cleanup` argument.** Because effects run immediately, your effect will run before a `cleanup` function is returned. To use `cleanup` from with in the effect, use the argument passed to your effect instead:
|
||||
- **If your effect should disconnect itself, use the `cleanup` argument.** Because effects run immediately, your effect may run before a `cleanup` function is returned. To disconnect an effect from the inside, use the argument passed to your effect instead:
|
||||
```lua
|
||||
effect(function(cleanup)
|
||||
if condition() then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue