diff --git a/components/form/Form.tsx b/components/form/Form.tsx index 3daa2b445b2e..24e4d3c3a22d 100755 --- a/components/form/Form.tsx +++ b/components/form/Form.tsx @@ -5,6 +5,7 @@ import createDOMForm from 'rc-form/lib/createDOMForm'; import PureRenderMixin from 'rc-util/lib/PureRenderMixin'; import omit from 'omit.js'; import assign from 'object-assign'; +import createReactClass from 'create-react-class'; import warning from '../_util/warning'; import FormItem from './FormItem'; import { FIELD_META_PROP } from './constants'; @@ -120,7 +121,7 @@ export default class Form extends React.Component { })); /* eslint-disable react/prefer-es6-class */ - return (Component) => formWrapper(React.createClass({ + return (Component) => formWrapper(createReactClass({ propTypes: { form: PropTypes.object.isRequired, }, diff --git a/package.json b/package.json index 52c940b5353f..bd5fab7896e0 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "array-tree-filter": "~1.0.0", "babel-runtime": "6.x", "classnames": "~2.2.0", + "create-react-class": "^15.5.3", "css-animation": "^1.2.5", "dom-closest": "^0.2.0", "lodash.debounce": "^4.0.8",