docs: function(
      component,
      keys_to_watch_for_changes,
      additonal_callback = null
    ) {
      if (!Array.isArray(keys_to_watch_for_changes)) {
        throw keys_to_watch_for_changes + ' must be an array'
      }
      component.state = component.state || {} // initialize if not set
  
      // call this function whenever the store changes
      function _callback(changed_keys) {
        if (intersection(keys_to_watch_for_changes, changed_keys).length) {
          // only update the state if a key we care about has changed
          let state_update_obj = {}
          keys_to_watch_for_changes.forEach(k => (state_update_obj[k] = store._store[k]))
          this.setState(state_update_obj)
  
          // if some other custom callback is required by the component
          // call that function as well
          if (additonal_callback) {
            additonal_callback(changed_keys)
          }
        }
      }
      let callback_bound_to_component = _callback.bind(component)
  
      // add keys that map to the store's keys
      for (let k of keys_to_watch_for_changes) {
        if (!store._store.hasOwnProperty(k)) {
          throw 'Store does not have key ' + k
        }
        if (component.state.hasOwnProperty(k)) {
          console.warn('Overwriting existing state key ' + k)
        }
        component.state[k] = store._store[k]
  
        store._recordKeySubscriber(k, component.constructor.name)
      }
      return store.subscribe(callback_bound_to_component)
    }