diff --git a/package.json b/package.json index d35497e1b9..4100a5e107 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,6 @@ "connect-flash": "0.1.1", "cookie-session": "2.0.0-beta.3", "copy-to-clipboard": "3.2.0", - "create-react-class": "15.7.0", "csurf": "1.11.0", "express": "4.17.1", "graphiql": "1.4.2", diff --git a/src/dashboard/AppData.react.js b/src/dashboard/AppData.react.js index 997c292181..bd44686c86 100644 --- a/src/dashboard/AppData.react.js +++ b/src/dashboard/AppData.react.js @@ -11,24 +11,23 @@ import AppSelector from 'dashboard/AppSelector.react'; import AppsManager from 'lib/AppsManager'; import history from 'dashboard/history'; import ParseApp from 'lib/ParseApp'; -import createClass from 'create-react-class'; -let AppData = createClass({ - childContextTypes: { - generatePath: PropTypes.func, - currentApp: PropTypes.instanceOf(ParseApp) - }, +class AppData extends React.Component { + constructor(props) { + super(props); + this.generatePath = this.generatePath.bind(this); + } getChildContext() { return { generatePath: this.generatePath, currentApp: AppsManager.findAppBySlugOrName(this.props.params.appId) }; - }, + } generatePath(path) { return '/apps/' + this.props.params.appId + '/' + path; - }, + } render() { if (this.props.params.appId === '_') { @@ -48,6 +47,11 @@ let AppData = createClass({ ); } -}); +} + +AppData.childContextTypes = { + generatePath: PropTypes.func, + currentApp: PropTypes.instanceOf(ParseApp) +}; export default AppData; diff --git a/src/dashboard/Dashboard.js b/src/dashboard/Dashboard.js index 0dfe25ce1a..5f7153a367 100644 --- a/src/dashboard/Dashboard.js +++ b/src/dashboard/Dashboard.js @@ -54,17 +54,16 @@ import { Switch, } from 'react-router'; import { Route, Redirect } from 'react-router-dom'; -import createClass from 'create-react-class'; import { Helmet } from 'react-helmet'; import Playground from './Data/Playground/Playground.react'; const ShowSchemaOverview = false; //In progress features. Change false to true to work on this feature. -let Empty = createClass({ +class Empty extends React.Component { render() { return
Not yet implemented
; } -}); +} const AccountSettingsPage = () => (