title: Ant Design : getFieldDecorator()
body: <pre><code>import {
   Form, Input, Tooltip, Icon
  } from 'antd';
   import React , {Component }from 'react';
  import ReactDOM from 'react-dom';
  
  export default class RegistrationForm extends Component {
       state = {
       confirmDirty: false,
       autoCompleteResult: [],
       };
  
       handleSubmit = (e) =&gt; {
           e.preventDefault();
           this.props.form.validateFieldsAndScroll((err, values) =&gt; {
           if (!err) {
              console.log('Received values of form: ', values);
            }
         });
         }
  
       handleConfirmBlur = (e) =&gt; {
           const value = e.target.value;
           this.setState({ confirmDirty: this.state.confirmDirty || !!value                
           });
           }
  
          render() {
             console.log(this.props.form)
               const { getFieldDecorator } = this.props.form;
  
               const formItemLayout = {
               labelCol: {
                     xs: { span: 24 },
                     sm: { span: 8 },
                   },
                wrapperCol: {
                    xs: { span: 24 },
                    sm: { span: 16 },
                },
               };
  
  return (
    &lt;Form {...formItemLayout} onSubmit={this.handleSubmit}&gt;
      &lt;Form.Item
        label="E-mail"
        &gt;
        {getFieldDecorator('email', {
          rules: [{
            type: 'email', message: 'The input is not valid E-mail!',
          }, {
            required: true, message: 'Please input your E-mail!',
          }],
        })(
          &lt;Input /&gt;
          )}
      &lt;/Form.Item&gt;
  
      &lt;Form.Item
        label={(
          &lt;span&gt;
            Nickname&amp;nbsp;
            &lt;Tooltip title="What do you want others to call you?"&gt;
              &lt;Icon type="question-circle-o" /&gt;
            &lt;/Tooltip&gt;
          &lt;/span&gt;
        )}
        &gt;
        {getFieldDecorator('nickname', {
          rules: [{ required: true, message: 'Please input your nickname!', whitespace: true }],
        })(
          &lt;Input /&gt;
          )}
      &lt;/Form.Item&gt;
    &lt;/Form&gt;
  );
    }
     }
  </code></pre>
  
  <p>I am using <code>ant design</code> but when I run this code it says <code>this.props.form is undefined</code>. In this line when I declare <code>getFieldDecorator</code> in <code>render</code> function. </p>
  
  <p>Please tell from where are these props coming and how to use it ? I do not have any parent component that is passing any <code>prop</code>. help fix it. thanks in advance.</p>