0.1.1 • Published 1 year ago

@launchscout/live-signals v0.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

live-signals

This is a very teeny library to create signals that connect to a LiveState channel.

Usage

  • createPreactSignal(liveStateOrOptions) returns a preact signal bound the LiveState state, and a dispatchEvent function which will dispatch a CustomEvent to liveState
  • createPolyfillSignal(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.

    Example

    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.