Start the switch to prop-types
As https://facebook.github.io/react/docs/typechecking-with-proptypes.html says, React.PropTypes have moved into the npm package prop-types since React v15.5. I've already failed to update certain devDependencies because they mandate the use of prop-types so I'd rather we (gradually at least) move to prop-types rather than face a lot of work later on.
This commit is contained in:
parent
4a39a630a4
commit
571958cf26
|
@ -51,6 +51,7 @@
|
||||||
"lodash": "4.17.4",
|
"lodash": "4.17.4",
|
||||||
"nuclear-js": "1.4.0",
|
"nuclear-js": "1.4.0",
|
||||||
"postis": "2.2.0",
|
"postis": "2.2.0",
|
||||||
|
"prop-types": "15.5.10",
|
||||||
"react": "15.6.1",
|
"react": "15.6.1",
|
||||||
"react-dom": "15.6.1",
|
"react-dom": "15.6.1",
|
||||||
"react-i18next": "4.8.0",
|
"react-i18next": "4.8.0",
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { I18nextProvider } from 'react-i18next';
|
import { I18nextProvider } from 'react-i18next';
|
||||||
import { Provider } from 'react-redux';
|
import { Provider } from 'react-redux';
|
||||||
|
@ -39,19 +40,19 @@ export class AbstractApp extends Component {
|
||||||
* The default URL {@code AbstractApp} is to open when not in any
|
* The default URL {@code AbstractApp} is to open when not in any
|
||||||
* conference/room.
|
* conference/room.
|
||||||
*/
|
*/
|
||||||
defaultURL: React.PropTypes.string,
|
defaultURL: PropTypes.string,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (Optional) redux store for this app.
|
* (Optional) redux store for this app.
|
||||||
*/
|
*/
|
||||||
store: React.PropTypes.object,
|
store: PropTypes.object,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The URL, if any, with which the app was launched.
|
* The URL, if any, with which the app was launched.
|
||||||
*/
|
*/
|
||||||
url: React.PropTypes.oneOfType([
|
url: PropTypes.oneOfType([
|
||||||
React.PropTypes.object,
|
PropTypes.object,
|
||||||
React.PropTypes.string
|
PropTypes.string
|
||||||
])
|
])
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue