diff --git a/package.json b/package.json index 230ecff..517b670 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "browserify": "^10.2.6", "chai": "^2.3.0", "coveralls": "^2.11.2", + "create-react-class": "^15.6.0", "envify": "^3.4.0", "es6-promise": "^2.1.1", "eslint": "^0.24.0", diff --git a/src/connectToStores.js b/src/connectToStores.js index 1564155..81f8364 100644 --- a/src/connectToStores.js +++ b/src/connectToStores.js @@ -1,4 +1,5 @@ import React from 'react' +import createReactClass from 'create-react-class'; // @todo Where to get these from? const isFunction = x => typeof x === 'function' @@ -23,7 +24,7 @@ function connectToStores(Spec, Component = Spec) { throw new Error('connectToStores() expects the wrapped component to have a static getPropsFromStores() method') } - const StoreConnection = React.createClass({ + const StoreConnection = createReactClass({ getInitialState() { return Spec.getPropsFromStores(this.props, this.context) },