wip: pre any props
This commit is contained in:
1 parent
12808ec0aa
commit
493591400f
14 files changed
+399
-381
No files matched your search
@@ -6,6 +6,6 @@ use std::rc::Rc;
|
||||
pub fn use_atom_root(cx: &ScopeState) -> &Rc<AtomRoot> {
|
||||
cx.use_hook(|| match cx.consume_context::<Rc<AtomRoot>>() {
|
||||
Some(root) => root,
|
||||
None => cx.provide_root_context(Rc::new(AtomRoot::new(cx.schedule_update_any()))),
|
||||
None => panic!("No atom root found in context. Did you forget place an AtomRoot component at the top of your app?"),
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user