text: import React from 'react'
  import ReactDOM from 'react-dom'
  
  import StreamDeck from './components/StreamDeck'
  
  
  class Watcher {
    constructor(container, options) {
      if (!options) options = {}
  
      this.container = container
      this.streams = []
      this.fps = options.fps || 10
      this.updateOn = options.updateOn || 'frame'
      this.bufferSize = options.bufferSize || 128
    }
  
  
    watch(observable, name) {
      name = name || `data-${this.streams.length}`
  
      this.streams.push({
        name: `${name}`,
        events: observable
      })
  
      this.render()
      return this
    }
  
  
    render() {
      const streams = this.streams
      const fps = this.fps
      const updateOn = this.updateOn
      const bufferSize = this.bufferSize
  
      ReactDOM.render(
        React.createElement(
          StreamDeck,
          { streams, fps, updateOn, bufferSize },
          null
        ),
        document.getElementById(this.container)
      )
    }
  }
  
  
  export default Watcher