From 571958cf26856e4f6cf8f66deefd1e213dfd9e31 Mon Sep 17 00:00:00 2001 From: Lyubo Marinov Date: Tue, 15 Aug 2017 16:44:29 -0500 Subject: [PATCH] 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. --- package.json | 1 + react/features/app/components/AbstractApp.js | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 95afc103e..dccceea52 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "lodash": "4.17.4", "nuclear-js": "1.4.0", "postis": "2.2.0", + "prop-types": "15.5.10", "react": "15.6.1", "react-dom": "15.6.1", "react-i18next": "4.8.0", diff --git a/react/features/app/components/AbstractApp.js b/react/features/app/components/AbstractApp.js index f77422126..41a56c09e 100644 --- a/react/features/app/components/AbstractApp.js +++ b/react/features/app/components/AbstractApp.js @@ -1,3 +1,4 @@ +import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { I18nextProvider } from 'react-i18next'; 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 * conference/room. */ - defaultURL: React.PropTypes.string, + defaultURL: PropTypes.string, /** * (Optional) redux store for this app. */ - store: React.PropTypes.object, + store: PropTypes.object, /** * The URL, if any, with which the app was launched. */ - url: React.PropTypes.oneOfType([ - React.PropTypes.object, - React.PropTypes.string + url: PropTypes.oneOfType([ + PropTypes.object, + PropTypes.string ]) };