kuy / redux-tower

Saga powered routing engine for Redux app.
154 stars 15 forks source link

Error on referring `react.PropTypes` on `0.0.6` package #122

Open gunyarakun opened 6 years ago

gunyarakun commented 6 years ago

With react@16.0.0, Uncaught TypeError: Cannot read property 'string' of undefined occurs because lib/react/link.js in the released 0.0.6 package from npm includes these lines which uses react.PropTypes.

Link.propTypes = {
  to: _react.PropTypes.string,
  href: _react.PropTypes.string,
  external: _react.PropTypes.bool,
  target: _react.PropTypes.string,
  className: _react.PropTypes.string,
  onClick: _react.PropTypes.func
};

I think separating the package prop-types from react at React v15.5 would cause this issue. https://reactjs.org/docs/typechecking-with-proptypes.html

Rebuilding redux-tower from the latest source codes resolves the problem in my environment.

kuy commented 6 years ago

@gunyarakun Thanks for giving comment. I'll rebuild and release within few days.

goncy commented 6 years ago

This was solved?