From 5e9112ec715ed0f47c2fdb1eb23adccfeb371067 Mon Sep 17 00:00:00 2001 From: Caleb Date: Sat, 9 Sep 2017 20:14:10 -0600 Subject: [PATCH] Upgrade to seperate `create-react-class` library. `React.createClass` was split off/depreciated as of 15.5.0: https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html#migrating-from-react.createclass --- package.json | 1 + src/index.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 732eb384..60cf6fc4 100644 --- a/package.json +++ b/package.json @@ -99,6 +99,7 @@ "autoprefixer": "^6.3.3", "babel-plugin-transform-builtin-extend": "^1.1.0", "classnames": "^2.2.5", + "create-react-class": "^15.6.0", "dateformat": "^1.0.12", "deep-equal": "^1.0.1", "fuzzy": "^0.1.1", diff --git a/src/index.js b/src/index.js index 3884354c..be5d2cf6 100644 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,5 @@ import React from 'react'; +import createReactClass from 'create-react-class'; import { render } from 'react-dom'; import { AppContainer } from 'react-hot-loader'; import 'file-loader?name=index.html!../example/index.html'; @@ -57,7 +58,7 @@ for (const method in registry) { // eslint-disable-line if (typeof window !== 'undefined') { window.CMS = CMS; - window.createClass = window.createClass || React.createClass; + window.createClass = window.createClass || createReactClass; window.h = window.h || React.createElement; }