Skip to content

Commit 1fd640f

Browse files
author
Kyle Odell
committed
[#289] Use independent 'prop-types' package.
React.PropTypes is deprecated from React@15.5
1 parent 1a302fb commit 1fd640f

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

examples/basic/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 React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23
import ReactDOM from 'react-dom';
34
import { createStore, compose, combineReducers } from 'redux';
45

examples/server-rendering/components.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 React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23
import {connect} from 'react-redux';
34
import {Link} from 'react-router';
45

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"mocha": "^2.2.5",
5050
"mocha-jsdom": "^1.0.0",
5151
"node-libs-browser": "^0.5.2",
52+
"prop-types": "^15.6.0",
5253
"react": "^0.14.1",
5354
"react-addons-test-utils": "^0.14.1",
5455
"react-dom": "^0.14.1",

src/ReduxRouter.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 React, { Component } from 'react';
2+
import PropTypes from 'prop-types';
23
import { connect } from 'react-redux';
34
import { RouterContext as DefaultRoutingContext } from 'react-router';
45
import { createRouterObject } from 'react-router/lib/RouterUtils';

src/__tests__/ReduxRouter-test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import {
77

88
import * as server from '../server';
99

10-
import React, { Component, PropTypes } from 'react';
10+
import React, { Component } from 'react';
11+
import PropTypes from 'prop-types';
1112
import { renderToString } from 'react-dom/server';
1213
import {
1314
renderIntoDocument,

0 commit comments

Comments
 (0)