mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 23:04:24 +00:00
Update book
This commit is contained in:
parent
cee32a3f8f
commit
8e624d4942
2 changed files with 3 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
use leptos::*;
|
||||
|
||||
fn main() {
|
||||
run_scope(|cx| {
|
||||
run_scope(create_runtime(), |cx| {
|
||||
// signal
|
||||
let (count, set_count) = create_signal(cx, 1);
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ But that’s _exactly_ how reactive programming works.
|
|||
```rust
|
||||
use leptos::*;
|
||||
|
||||
run_scope(|cx| {
|
||||
run_scope(create_runtime(), |cx| {
|
||||
let (a, set_a) = create_signal(cx, 0);
|
||||
let (b, set_b) = create_signal(cx, 0);
|
||||
let c = move || a() + b();
|
||||
|
@ -46,7 +46,7 @@ Hopefully, this makes some intuitive sense. After all, `c` is a closure. Calling
|
|||
```rust
|
||||
use leptos::*;
|
||||
|
||||
run_scope(|cx| {
|
||||
run_scope(create_runtime(), |cx| {
|
||||
let (a, set_a) = create_signal(cx, 0);
|
||||
let (b, set_b) = create_signal(cx, 0);
|
||||
let c = move || a() + b();
|
||||
|
|
Loading…
Reference in a new issue