Rsx children

This commit is contained in:
2026-01-30 22:54:56 +01:00
parent 91f0878edc
commit 03191b0a57
5 changed files with 147 additions and 11 deletions
+2 -2
View File
@@ -115,11 +115,11 @@ impl<T> DerefMut for Inner<'_, T> {
}
}
pub trait HookDependency {
pub trait HookDependency: Send + Sync {
fn on_update(&self, hook: HookEffect);
}
impl<T> HookDependency for State<T> {
impl<T: Send + Sync> HookDependency for State<T> {
fn on_update(&self, hook: HookEffect) {
self.dependents.lock().unwrap().push(hook);
}