无法以 redux 形式获取表单值?

Cannot get the form values in redux form?

我正在使用 React 和 Redux 表单创建一个简单的登录表单。 当我尝试控制在表单中输入的值时,我得到了未定义的信息。

    import React, { Component } from 'react';
    import { reduxForm } from 'redux-form';`enter code here`

    class Signin extends Component {
      handleFormSubmit({email, password}){
        console.log(email,password);
        // this.props.signinUser({email,password});
      }

      render(){
        const { handleSubmit, fields: { email, password }} = this.props;

        return (
          <form onSubmit={handleSubmit(this.handleFormSubmit.bind(this))}>
            <fieldset className="form-group">
              <label>Email:</label>
              <input className="form-control" {...email} />
            </fieldset>
            <fieldset className="form-group">
              <label>Password:</label>
              <input className="form-control" {...password}  />
            </fieldset>
            <button action="submit" className="btn btn-primary">Sign in</button>
          </form>
        );
      }
    }

    export default reduxForm({
      form: 'signin',
      fields: ['email', 'password']
    })(Signin);

我想通了。

我遵循的教程是一年前的,并且使用的是旧版本的 Redux Form,它接受这种形式的输入。但是在安装模块时,我安装了最新版本。谢谢。