Ant Design error: "Form.create() getFieldDecorator is not a function"
<pre><code>"antd": "^1.11.1",
"react": "^15.1.0",
"react-dom": "^15.1.0",
</code></pre>

<p><strong>Error: Uncaught TypeError: getFieldDecorator is not a function</strong></p>

<p>ant design demo: <a href="https://ant.design/components/form/" rel="noreferrer">https://ant.design/components/form/</a></p>

<pre><code>import React, {Component} from 'react';
import { Form, Icon, Input, Button } from 'antd';
const FormItem = Form.Item;

const HorizontalLoginForm = Form.create()(React.createClass({
  handleSubmit(e) {
    e.preventDefault();
    this.props.form.validateFields((err, values) =&gt; {
      if (!err) {
        console.log('Received values of form: ', values);
      }
    });
  },
  render() {
    const { getFieldDecorator } = this.props.form;
    return (
      &lt;Form inline onSubmit={this.handleSubmit}&gt;
        &lt;FormItem&gt;
          {getFieldDecorator('userName', {
            rules: [{ required: true, message: 'Please input your username!' }],
          })(
            &lt;Input addonBefore={&lt;Icon type="user" /&gt;} placeholder="Username" /&gt;
          )}
        &lt;/FormItem&gt;
        &lt;FormItem&gt;
          {getFieldDecorator('password', {
            rules: [{ required: true, message: 'Please input your Password!' }],
          })(
            &lt;Input addonBefore={&lt;Icon type="lock" /&gt;} type="password" placeholder="Password" /&gt;
          )}
        &lt;/FormItem&gt;
        &lt;FormItem&gt;
          &lt;Button type="primary" htmlType="submit"&gt;Log in&lt;/Button&gt;
        &lt;/FormItem&gt;
      &lt;/Form&gt;
    );
  },
}));

export default HorizontalLoginForm;
</code></pre>