rename use_selector to use_memo

This commit is contained in:
Jonathan Kelley committed 2024-01-20 23:32:12 -08:00
1 parent fc0b0f02a1
commit 06d9b575b7
16 files changed
+130 -80

No files matched your search

+3 -3
View File
@@ -4,13 +4,13 @@
use dioxus::prelude::*;
static COUNT: GlobalSignal<i32> = Signal::global(|| 0);
static DOUBLED_COUNT: GlobalSelector<i32> = Signal::global_selector(|| COUNT() * 2);
fn main() {
launch(app);
}
static COUNT: GlobalSignal<i32> = Signal::global(|| 0);
static DOUBLED_COUNT: GlobalMemo<i32> = Signal::global_memo(|| COUNT() * 2);
fn app() -> Element {
rsx! {
h1 { "{COUNT} x 2 = {DOUBLED_COUNT}" }