Redux-form 从表单实例内部访问表单的值
Redux-form access form's values from inside the form's instance
根据我对 the docs 的理解,如果我从组件实例内部访问 props.values
,我应该得到一个描述表单每个字段中的值的对象。
values : Object
The current values of all the fields in the form.
在我的例子中,我需要访问一个值,以便重定向到
signup?email=theemailvalue
提交表单后。
然而,当我访问 props.value
时,我得到一个空对象。
我做错了什么?
作为 redux-form 文档,访问表单值的正确方法是 formValueSelector
根据我对 the docs 的理解,如果我从组件实例内部访问 props.values
,我应该得到一个描述表单每个字段中的值的对象。
values : Object
The current values of all the fields in the form.
在我的例子中,我需要访问一个值,以便重定向到
signup?email=theemailvalue
提交表单后。
然而,当我访问 props.value
时,我得到一个空对象。
我做错了什么?
作为 redux-form 文档,访问表单值的正确方法是 formValueSelector