fix the provide context docs
This commit is contained in:
1 parent
264f04fc30
commit
2c0eb303f6
1 file changed
+1
-6
@@ -373,17 +373,12 @@ impl<'src> ScopeState {
|
|||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Expose state to children further down the [`crate::VirtualDom`] Tree. Does not require `clone` on the context,
|
/// Expose state to children further down the [`crate::VirtualDom`] Tree. Requires `Clone` on the context to allow getting values down the tree.
|
||||||
/// though we do recommend it.
|
|
||||||
///
|
///
|
||||||
/// This is a "fundamental" operation and should only be called during initialization of a hook.
|
/// 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.
|
/// 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
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```rust, ignore
|
/// ```rust, ignore
|
||||||
|
|||||||
Reference in new issue
Block a user