mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 14:54:16 +00:00
Fix misplaced ref in TodoMVC
This commit is contained in:
parent
3730427789
commit
3d0a8f574e
1 changed files with 2 additions and 2 deletions
|
@ -179,7 +179,7 @@ pub fn TodoMVC(cx: Scope) -> Element {
|
|||
// this is the main point of `create_effect`: to synchronize reactive state
|
||||
// with something outside the reactive system (like localStorage)
|
||||
create_effect(cx, move |_| {
|
||||
/* if let Ok(Some(storage)) = window().local_storage() {
|
||||
if let Ok(Some(storage)) = window().local_storage() {
|
||||
let objs = todos
|
||||
.get()
|
||||
.0
|
||||
|
@ -190,7 +190,7 @@ pub fn TodoMVC(cx: Scope) -> Element {
|
|||
if storage.set_item(STORAGE_KEY, &json).is_err() {
|
||||
log::error!("error while trying to set item in localStorage");
|
||||
}
|
||||
} */
|
||||
}
|
||||
});
|
||||
|
||||
view! { cx,
|
||||
|
|
Loading…
Reference in a new issue