fix outlets being updated out of order
This commit is contained in:
1 parent
f94dc85491
commit
46017d5b7e
3 files changed
+36
-10
No files matched your search
@@ -8,7 +8,10 @@ pub(crate) struct OutletContext {
|
||||
}
|
||||
|
||||
pub(crate) fn use_outlet_context(cx: &ScopeState) -> &OutletContext {
|
||||
let outlet_context = use_context(cx).unwrap();
|
||||
let outlet_context = cx.use_hook(|| {
|
||||
cx.consume_context()
|
||||
.unwrap_or(OutletContext { current_level: 0 })
|
||||
});
|
||||
outlet_context
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user