mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-26 22:20:19 +00:00
Fix compile
This commit is contained in:
parent
cef64d43df
commit
8cc17dc1bd
4 changed files with 4 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
#![allow(missing_docs)]
|
||||
use crate::use_hook_did_run;
|
||||
use crate::{use_hook_did_run, use_signal};
|
||||
use dioxus_core::{
|
||||
prelude::{spawn, use_drop, use_hook},
|
||||
Task,
|
||||
|
|
|
@ -3,8 +3,8 @@ use dioxus_signals::{CopyValue, ReadOnlySignal, Readable, Signal, SignalData};
|
|||
use dioxus_signals::{Storage, Writable};
|
||||
// use generational_box::Storage;
|
||||
|
||||
use crate::use_signal;
|
||||
use crate::{dependency::Dependency, use_hook_did_run};
|
||||
use dioxus_signals::use_signal;
|
||||
// use dioxus_signals::{signal::SignalData, ReadOnlySignal, Signal};
|
||||
|
||||
/// Creates a new unsync Selector. The selector will be run immediately and whenever any signal it reads changes.
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#![allow(missing_docs)]
|
||||
use crate::use_signal;
|
||||
use dioxus_core::{
|
||||
prelude::{spawn, use_hook},
|
||||
ScopeState, Task,
|
||||
|
|
|
@ -96,7 +96,7 @@ fn use_maybe_signal_sync<T: 'static, U: Storage<SignalData<T>>>(
|
|||
|
||||
// By default, we want to unsubscribe the current component from the signal on every render
|
||||
// any calls to .read() in the body will re-subscribe the component to the signal
|
||||
use_before_render(|| signal.unsubscribe(current_scope_id().unwrap()));
|
||||
use_before_render(move || signal.unsubscribe(current_scope_id().unwrap()));
|
||||
|
||||
signal
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue