Skip to content

Commit

Permalink
use create-react-class, ref ant-design#5678
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed May 17, 2017
1 parent 82bfa3d commit c6ec1ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/form/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -120,7 +121,7 @@ export default class Form extends React.Component<FormProps, any> {
}));

/* eslint-disable react/prefer-es6-class */
return (Component) => formWrapper(React.createClass({
return (Component) => formWrapper(createReactClass({
propTypes: {
form: PropTypes.object.isRequired,
},
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit c6ec1ce

Please sign in to comment.