fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

React v15.5 claims deprecation warning

Open nekoya opened this issue 9 years ago • 3 comments

Bug Report

  • office-ui-fabric-react: 2.17.0
  • react: 15.5.4

Priorities and help requested (not applicable if asking question):

Are you willing to submit a PR to fix? Yes

Requested priority: Normal

Describe the issue:

By React v15.5, React.PropTypes is deprecated.

  • https://facebook.github.io/react/warnings/dont-call-proptypes.html

Latest office-ui-fabric-react calls it directly, so we encounter the deprecation message like below.

Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead.

nekoya avatar May 08 '17 07:05 nekoya

I'm not sure we can resolve this without taking a hard dependency on 15.5.4 which may break a lot of people.

dzearing avatar May 11 '17 17:05 dzearing

From my understanding it should be backwards compatible if you included the prop-types package and replaced references React.PropTypes with https://github.com/reactjs/prop-types#compatibility

I'm happy to do a PR to fix this issue as well

chriswbarrett avatar May 11 '17 22:05 chriswbarrett

I've found react-addons-test-utils is also deprecated, it moved into react-dom/test-utils.

We have to resolve both finally, but probably we can try them separately.

I'll try the following steps.

  1. switch to prop-types with keeping React v15.4
  2. update React to v15.5, and replace react-addons-test-utils

nekoya avatar May 12 '17 01:05 nekoya