Skip to content

0.3.0 - .subscribe and useSubscribe to get notifications when values update

Latest

Choose a tag to compare

@andreterron andreterron released this 02 May 01:57
· 16 commits to main since this release

0.3.0

Subscribe to value updates with live.subscribe({ next: (value) => console.log(value) }); or with const { value, setValue } = useSubscribe(live);

Added

  • live.subscribe: pass callbacks to be called whenever the value changes
  • useSubscribe: a React hook that subscribe to a live. Automatically unsubscribes when the component is unmounted.

Links