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

+2 -2
View File
@@ -97,7 +97,7 @@ fn Child() -> Element {
In addition to local subscriptions in components, `dioxus-signals` provides a way to derive data with local subscriptions.
The use_selector hook will only rerun when any signals inside the hook change:
The use_memo hook will only rerun when any signals inside the hook change:
```rust
use dioxus::prelude::*;
@@ -106,7 +106,7 @@ use dioxus_signals::*;
#[component]
fn App() -> Element {
let signal = use_signal(|| 0);
let doubled = use_selector(|| signal * 2);
let doubled = use_memo(|| signal * 2);
rsx! {
button {