lib/StatefulComponent.js
/**
   * @param initialState The initial state of the this component
   * @param providers SharedStateProviders that will provide values for shared state. This is mostly used where you
   *          want to share state only between a set of components.
   * @param props The react props for this component
   */
@param initialState The initial state of the this component
@param providers SharedStateProviders that will provide values for shared state. This is mostly used where you
want to share state only between a set of components.
@param props The react props for this component
@param initialState The initial state of the this component @param providers SharedStateProviders that will provide values for shared state . This is mostly used where you want to share state only between a set of components . @param props The react props for this component
function StatefulComponent(initialState, providers, props) {
    var _this;
    _classCallCheck(this, StatefulComponent);
    if (!props && providers && !Array.isArray(providers)) {
      props = providers;
      providers = [];
    }
    _this = _possibleConstructorReturn(this, _getPrototypeOf(StatefulComponent).call(this, props));
    _this.state = initialState;
    _this.providers = providers;
    if (providers && !Array.isArray(providers)) _this.providers = [_this.providers];
    _this.providers.forEach(function (p) {
      if (_typeof(p) !== 'object') {
        throw 'You supplied a provider that is not an instance of an object. Make sure you did: new Provider()' + ' This came from the component with initial state: ' + JSON.stringify(initialState);
      }
    });
    _this.listenPaths = _ObjectPaths["default"].toPaths(initialState);
    return _this;
  }
function StatefulComponent ( initialState , providers , props ) { var _this ; _classCallCheck ( this , StatefulComponent ) ; if ( ! props && providers && ! Array . isArray ( providers ) ) { props = providers ; providers = [ ] ; } _this = _possibleConstructorReturn ( this , _getPrototypeOf ( StatefulComponent ) . call ( this , props ) ) ; _this . state = initialState ; _this . providers = providers ; if ( providers && ! Array . isArray ( providers ) ) _this . providers = [ _this . providers ] ; _this . providers . forEach ( function ( p ) { if ( _typeof ( p ) !== 'object' ) { throw 'You supplied a provider that is not an instance of an object. Make sure you did: new Provider()' + ' This came from the component with initial state: ' + JSON . stringify ( initialState ) ; } } ) ; _this . listenPaths = _ObjectPaths [ "default" ] . toPaths ( initialState ) ; return _this ; }
@param initialState The initial state of the this component
 @param providers SharedStateProviders that will provide values for shared state.
@param initialState The initial state of the this component @param providers SharedStateProviders that will provide values for shared state .