simplify use_dependencies docs

This commit is contained in:
Evan Almloff committed 2024-03-13 10:03:00 -05:00
1 parent 0951a389f7
commit 3866aa2977
3 files changed
+8 -27

No files matched your search

+2 -2
View File
@@ -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,));