fix: namespacing of dynamic attributes
This commit is contained in:
1 parent
db5b65b6cb
commit
0bf4725639
9 files changed
+24
-31
No files matched your search
@@ -1,6 +1,8 @@
|
||||
use dioxus_core::ScopeState;
|
||||
|
||||
/// Consume some context in the tree, providing a sharable handle to the value
|
||||
///
|
||||
/// Does not regenerate the value if the value is changed at the parent.
|
||||
pub fn use_context<T: 'static + Clone>(cx: &ScopeState) -> Option<&T> {
|
||||
cx.use_hook(|| cx.consume_context::<T>()).as_ref()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user