How to use the subx.runAndMonitor function in subx

To help you get started, we’ve selected a few subx examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github electerm / electerm / src / client / components / common / react-subx.jsx View on Github external
this.render = () => {
      clearSubscription()
      const { result, stream$ } = SubX.runAndMonitor(props.store, render)
      this.__subscription__ = stream$.subscribe(event => {
        if (event.type === 'STALE' && R.equals(R.path(event.path, props.store), event.cache)) {
          return
        }
        clearSubscription()
        this.forceUpdate()
      })
      return result
    }
    if (this.componentWillUnmount) {

subx

SubX, Next generation state container

MIT
Latest version published 3 years ago

Package Health Score

42 / 100
Full package analysis