Sfoglia il codice sorgente

Merge pull request #853 from Demonthos/fix-provide-context-docs

Fix the provide context docs
Jon Kelley 2 anni fa
parent
commit
49c5a5043a
1 ha cambiato i file con 1 aggiunte e 6 eliminazioni
  1. 1 6
      packages/core/src/scopes.rs

+ 1 - 6
packages/core/src/scopes.rs

@@ -373,17 +373,12 @@ impl<'src> ScopeState {
         None
     }
 
-    /// Expose state to children further down the [`crate::VirtualDom`] Tree. Does not require `clone` on the context,
-    /// though we do recommend it.
+    /// Expose state to children further down the [`crate::VirtualDom`] Tree. Requires `Clone` on the context to allow getting values down the tree.
     ///
     /// This is a "fundamental" operation and should only be called during initialization of a hook.
     ///
     /// For a hook that provides the same functionality, use `use_provide_context` and `use_context` instead.
     ///
-    /// If a state is provided that already exists, the new value will not be inserted. Instead, this method will
-    /// return the existing value. This behavior is chosen so shared values do not need to be `Clone`. This particular
-    /// behavior might change in the future.
-    ///
     /// # Example
     ///
     /// ```rust, ignore