diff --git a/tachys/src/reactive_graph/bind.rs b/tachys/src/reactive_graph/bind.rs index 0286f532df..d62a6c7bfe 100644 --- a/tachys/src/reactive_graph/bind.rs +++ b/tachys/src/reactive_graph/bind.rs @@ -9,13 +9,15 @@ use crate::{ renderer::{types::Element, RemoveEventHandler}, view::{Position, ToTemplate}, }; +#[cfg(feature = "reactive_stores")] +use reactive_graph::owner::Storage; use reactive_graph::{ signal::{ReadSignal, RwSignal, WriteSignal}, traits::{Get, Update}, wrappers::read::Signal, }; #[cfg(feature = "reactive_stores")] -use reactive_stores::{KeyedSubfield, Subfield}; +use reactive_stores::{ArcField, Field, KeyedSubfield, Subfield}; use send_wrapper::SendWrapper; use wasm_bindgen::JsValue; @@ -358,6 +360,21 @@ where } } +#[cfg(feature = "reactive_stores")] +impl IntoSplitSignal for Field +where + Self: Get + Update + Clone, + S: Storage>, +{ + type Value = T; + type Read = Self; + type Write = Self; + + fn into_split_signal(self) -> (Self::Read, Self::Write) { + (self, self) + } +} + #[cfg(feature = "reactive_stores")] impl IntoSplitSignal for KeyedSubfield where