Fix compile

This commit is contained in:
Jonathan Kelley 2024-01-29 17:03:50 -08:00
parent cef64d43df
commit 8cc17dc1bd
No known key found for this signature in database
GPG key ID: 1FBB50F7EB0A08BE
4 changed files with 4 additions and 3 deletions

View file

@ -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,

View file

@ -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.

View file

@ -1,4 +1,5 @@
#![allow(missing_docs)]
use crate::use_signal;
use dioxus_core::{
prelude::{spawn, use_hook},
ScopeState, Task,

View file

@ -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
}