goatslacker / alt

Isomorphic flux implementation
http://alt.js.org/
3.45k stars 323 forks source link

PropTypes in React 16 Deprecated #715

Closed BigPrimeNumbers closed 6 years ago

BigPrimeNumbers commented 7 years ago

Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead. I believe this is causing the warning:

// TODO need to copy some other contextTypes maybe?
// what about propTypes?

var AltContainer = (function (_React$Component) {
  _inherits(AltContainer, _React$Component);

  _createClass(AltContainer, [{
    key: 'getChildContext',
    value: function getChildContext() {
      var flux = this.props.flux || this.context.flux;
      return flux ? { flux: flux } : {};
    }
  }], [{
    key: 'contextTypes',
    value: {
      flux: _react2['default'].PropTypes.object
    },
    enumerable: true
  }, {
    key: 'childContextTypes',
    value: {
      flux: _react2['default'].PropTypes.object
    },
    enumerable: true
  }]);
rzec-r7 commented 6 years ago

I am pretty sure the PropTypes was deprecated in one of the 15.x releases and completely removed in React 16 so I am not even sure AltJS would work at all in React 16 (though I have not tried it).

goatslacker commented 6 years ago

The AltContainer stuff lives in its own package/repo and that's been updated already.