This is a very teeny library to create signals that connect to a LiveState channel.
createPreactSignal(liveStateOrOptions)
returns a preact signal bound the LiveState state, and a dispatchEvent function which will dispatch a CustomEvent to liveStatecreatePolyfillSignal(liveStateOrOptions)
returns a TC39 polyfill signal bound the LiveState state, , and a dispatchEvent function which will dispatch a CustomEvent to liveState
Both take either a LiveState
instance or options which will be used as the arg to create a LiveState instance.
See preact-example.html for a small example that uses preact signals. It is designed to connect to the silly_crm example project. You'll need to have that up and running first for it to work.