Skip to content

Commit

Permalink
reactive_graph signals
Browse files Browse the repository at this point in the history
  • Loading branch information
dnorman committed Dec 17, 2024
1 parent b490759 commit d070ba1
Show file tree
Hide file tree
Showing 21 changed files with 592 additions and 183 deletions.
136 changes: 57 additions & 79 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[workspace]
members = ["core", "derive", "server", "proto", "web-client", "examples/wasm-bindings", "examples/model", "examples/leptos-app", "wasm-signal", "ankql", "index"]
members = ["core", "derive", "server", "proto", "web-client", "examples/wasm-bindings", "examples/model", "examples/leptos-app", "react-signals", "ankql", "index"]
resolver = "2"
4 changes: 2 additions & 2 deletions derive/src/wasm_signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub fn derive_wasm_signal_impl(input: TokenStream) -> TokenStream {
}

// #[::wasm_bindgen::prelude::wasm_bindgen]
pub fn for_each(&self, callback: ::js_sys::Function) -> ::ankurah_wasm_signal::Subscription {
pub fn for_each(&self, callback: ::js_sys::Function) -> ::ankurah_react_signals::Subscription {
let signal = ::std::rc::Rc::clone(&self.inner);
let callback = ::std::rc::Rc::new(callback);

Expand All @@ -56,7 +56,7 @@ pub fn derive_wasm_signal_impl(input: TokenStream) -> TokenStream {
let _ = future.await;
});

::ankurah_wasm_signal::Subscription::new(callback, abort_handle)
::ankurah_react_signals::Subscription::new(callback, abort_handle)
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion examples/leptos-app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ edition = "2021"

[dependencies]
console_error_panic_hook = "0.1.7"
leptos = { version = "0.7.0-rc2", features = ["csr", "nightly"] }
leptos = { git = "https://github.com/synestheticsystems/leptos", branch = "reactive_graph_pub_items", features = ["csr", "nightly"] }
ankurah-web-client = { path = "../../web-client" }
example-model = { path = "../model" }
4 changes: 2 additions & 2 deletions examples/leptos-app/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ fn App() -> impl IntoView {
let client = Client::new("localhost:9797").unwrap();
let (count, set_count) = signal(0);

let connection_state: leptos::prelude::ReadSignal<&'static str> = client.connection_state();
let connection_state = client.connection_state();
view! {
<div>
<p>{count}</p>
<p>{connection_state}</p>
<p>{move || connection_state.get().to_string()}</p>
// <button
// on:click=move |_| {
// // on stable, this is set_count.set(3);
Expand Down
Loading

0 comments on commit d070ba1

Please sign in to comment.