wip: go back to noisy lifetime solution

This commit is contained in:
Jonathan Kelley committed 2021-12-14 02:27:59 -05:00
1 parent 0545d27182
commit 8daf7a6ed8
31 files changed
+214 -170

No files matched your search

+2 -3
View File
@@ -3,10 +3,9 @@ use std::{
rc::Rc,
};
use dioxus_core::AnyContext;
use dioxus_core::ScopeState;
pub fn use_ref<'a, T: 'static>(cx: &dyn AnyContext<'a>, f: impl FnOnce() -> T) -> UseRef<'a, T> {
let cx = cx.get_scope();
pub fn use_ref<'a, T: 'static>(cx: &'a ScopeState, f: impl FnOnce() -> T) -> UseRef<'a, T> {
cx.use_hook(
|_| UseRefInner {
update_scheduled: Cell::new(false),