Skip to content

Commit 23b95cc

Browse files
HiDeoodavidnpma
authored andcommitted
fix(react): Migrate from React.PropTypes (#88)
With React 15.5.0, `React.PropTypes` are now extracted to a separate package. They are still accessible via the main React object, but using them will log a deprecation warning to the console when in development mode.
1 parent 1e18f1d commit 23b95cc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,15 @@
3434
"react-native"
3535
],
3636
"devDependencies": {
37-
"react": "^0.14.0 || ^15.0.0",
3837
"babel-cli": "^6.9.0",
3938
"babel-core": "^6.9.0",
4039
"babel-loader": "^6.2.4",
4140
"babel-plugin-rewire": "^1.0.0-rc-3",
4241
"babel-preset-es2015": "^6.3.3",
4342
"babel-preset-react": "^6.5.0",
4443
"babel-preset-stage-0": "^6.3.13",
44+
"prop-types": "^15.5.4",
45+
"react": "^0.14.0 || ^15.0.0",
4546
"react-addons-test-utils": "^15.0.0",
4647
"react-dom": "^0.14.0 || ^15.0.0",
4748
"rimraf": "^2.5.2",

src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, {Component, PropTypes} from 'react'
1+
import PropTypes from 'prop-types';
2+
import React, {Component} from 'react'
23
import ReactDOM from 'react-dom'
34
import style from './style.js'
45
import ErrorStackParser from 'error-stack-parser'

0 commit comments

Comments
 (0)