소스 검색

Merge pull request #1108 from marc2332/patch-7

feat: Simplify `use_shared_state` doc example
Jon Kelley 2 년 전
부모
커밋
11c9abcf7c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      packages/hooks/src/use_shared_state.rs

+ 1 - 1
packages/hooks/src/use_shared_state.rs

@@ -71,7 +71,7 @@ impl<T> ProvidedStateInner<T> {
 ///     let current_theme = *theme.read();
 ///
 ///     render! {
-///         match &*theme.read() {
+///         match current_theme {
 ///             Theme::Dark => {
 ///                 "Dark mode"
 ///             }