Skip to content
Discussion options

You must be logged in to vote

I'm marking this as an answer, albeit a partial answer. But hopefully it's helpful to others nonetheless.

You can "export" a signal using observable and "import" using from


Code sample

Summary: Create a signal in one app, turn it into an observable, then pass that observable to another solidjs app instance, that second solid app would turn the observable back into a signal.

// Source app
import { createSignal, observable } from "solid-js";

const [number, setNumber] = createSignal(1);
setInterval(() => {
    setNumber(Math.random());
}, 100);
window.signalObservable = observable(number);
// Destination app
import { from } from "solid-js";

// This now mirrors the `number` signal in the o…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@CreativeTechGuy
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by CreativeTechGuy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants