Skip to content

Commit

Permalink
Fix typo (#42)
Browse files Browse the repository at this point in the history
signa -> signal
  • Loading branch information
JonathanPlasse authored Jan 5, 2024
1 parent 909cb72 commit 0d9c4cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/reactivity/14_create_effect.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ create_effect(move |_| {
let b = move || a() * 2;
```

If you need to synchronize some reactive value with the non-reactive world outside—like a web API, the console, the filesystem, or the DOM—writing to a signal in an effect is a fine way to do that. In many cases, though, you’ll find that you’re really writing to a signa inside an event listener or something else, not inside an effect. In these cases, you should check out [`leptos-use`](https://leptos-use.rs/) to see if it already provides a reactive wrapping primitive to do that!
If you need to synchronize some reactive value with the non-reactive world outside—like a web API, the console, the filesystem, or the DOM—writing to a signal in an effect is a fine way to do that. In many cases, though, you’ll find that you’re really writing to a signal inside an event listener or something else, not inside an effect. In these cases, you should check out [`leptos-use`](https://leptos-use.rs/) to see if it already provides a reactive wrapping primitive to do that!

> If you’re curious for more information about when you should and shouldn’t use `create_effect`, [check out this video](https://www.youtube.com/watch?v=aQOFJQ2JkvQ) for a more in-depth consideration!
Expand Down

0 comments on commit 0d9c4cc

Please sign in to comment.