Fix for Counters sample code in Readme (#2213)

* Fix for Counters sample code in Readme

For leptos code, there is no need for Memorization here. As memorization of the values of the text nodes in the renderer already happens.

* Reverted to Memo
This commit is contained in:
koti 2024-04-01 22:01:01 +05:30 committed by GitHub
parent 7949fcda9a
commit d45a71ba54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -273,7 +273,7 @@ fn Counters() -> Element {
[While in Leptos you would use the `<For>` component.](https://book.leptos.dev/view/04_iteration.html#dynamic-rendering-with-the-for-component):
```rust
fn Counters() -> Element {
fn Counters() -> impl IntoView {
let counters = RwSignal::new(vec![0; 10]);
view! {