simplify use_dependencies docs
This commit is contained in:
1 parent
0951a389f7
commit
3866aa2977
3 files changed
+8
-27
No files matched your search
@@ -166,8 +166,8 @@ impl<T: 'static> Memo<T> {
|
||||
///
|
||||
/// #[component]
|
||||
/// fn Comp(count: u32) -> Element {
|
||||
/// // Because the resource subscribes to `delay` by adding it as a dependency, the memo will rerun every time `count` changes.
|
||||
/// let new_count = use_memo(move || async move {
|
||||
/// // Because the memo subscribes to `count` by adding it as a dependency, the memo will rerun every time `count` changes.
|
||||
/// let new_count = use_memo(move || {
|
||||
/// count + 1
|
||||
/// })
|
||||
/// .use_dependencies((&count,));
|
||||
|
||||
Reference in new issue
Block a user