From 14d48c755825658f333089d37b5b3ba47045d479 Mon Sep 17 00:00:00 2001 From: Devin Chen Date: Sat, 3 Jun 2017 20:04:21 +0800 Subject: [PATCH] fix #1 React.createClass is deprecated --- js/Align.js | 3 ++- lib/Align.js | 4 ++++ package.json | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/js/Align.js b/js/Align.js index 84aa04b..e10d3f1 100644 --- a/js/Align.js +++ b/js/Align.js @@ -1,5 +1,6 @@ import React, { PropTypes } from 'react'; import ReactDOM from 'react-dom'; +import createReactClass from 'create-react-class'; import align from 'dom-align'; import addEventListener from './addEventListener'; //import isWindow from './isWindow'; @@ -136,4 +137,4 @@ const Align = React.createClass({ }, }); -export default Align; \ No newline at end of file +export default Align; diff --git a/lib/Align.js b/lib/Align.js index e0389c4..41e3795 100644 --- a/lib/Align.js +++ b/lib/Align.js @@ -10,6 +10,10 @@ var _reactDom = require('react-dom'); var _reactDom2 = _interopRequireDefault(_reactDom); +var _createReactClass = require('create-react-class'); + +var _createReactClass2 = _interopRequireDefault(_createReactClass); + var _domAlign = require('dom-align'); var _domAlign2 = _interopRequireDefault(_domAlign); diff --git a/package.json b/package.json index ef60492..05736c9 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "dependencies": { "add-dom-event-listener": "^1.0.1", "component-classes": "^1.2.6", + "create-react-class": "^15.5.3", "dom-align": "^1.5.2", "warning": "^3.0.0" },