parent
4251f6c0f4
commit
a302257129
|
@ -36,13 +36,23 @@ cargo add leptos --features=csr
|
|||
|
||||
> Using `nightly` Rust, and the `nightly` feature in Leptos enables the function-call syntax for signal getters and setters that is used in most of this book.
|
||||
>
|
||||
> To use `nightly` Rust, you can run
|
||||
> To use nightly Rust, you can either opt into nightly for all your Rust projects by running
|
||||
>
|
||||
> ```bash
|
||||
> rustup toolchain install nightly
|
||||
> rustup default nightly
|
||||
> ```
|
||||
>
|
||||
> or only for this project
|
||||
>
|
||||
> > ```bash
|
||||
> rustup toolchain install nightly
|
||||
> cd <into your project>
|
||||
> rustup override set nightly
|
||||
> ```
|
||||
>
|
||||
> [See here for more details.](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html)
|
||||
>
|
||||
> If you’d rather use stable Rust with Leptos, you can do that too. In the guide and examples, you’ll just use the [`ReadSignal::get()`](https://docs.rs/leptos/latest/leptos/struct.ReadSignal.html#impl-SignalGet%3CT%3E-for-ReadSignal%3CT%3E) and [`WriteSignal::set()`](https://docs.rs/leptos/latest/leptos/struct.WriteSignal.html#impl-SignalGet%3CT%3E-for-ReadSignal%3CT%3E) methods instead of calling signal getters and setters as functions.
|
||||
|
||||
Make sure you've added the `wasm32-unknown-unknown` target so that Rust can compile your code to WebAssembly to run in the browser.
|
||||
|
|
|
@ -51,7 +51,8 @@ The fact that the _list_ is static doesn’t mean the interface needs to be stat
|
|||
You can render dynamic items as part of a static list.
|
||||
|
||||
```rust
|
||||
// create a list of N signals
|
||||
// create a list of 5 signals
|
||||
let length = 5;
|
||||
let counters = (1..=length).map(|idx| create_signal(idx));
|
||||
|
||||
// each item manages a reactive view
|
||||
|
|
Loading…
Reference in New Issue