最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Redux-form access form's values from inside the form's instance - Stack Overflow

programmeradmin1浏览0评论

From my understanding from the docs if i access props.values from inside a ponent instance, I should get an object describing the values in each field of the form.

values : Object

The current values of all the fields in the form.

In my case, I need to access a value, in order to redirect to something like

signup?email=theemailvalue

upon form submission.

However when I access the props.value I get an empty object.

What am I doing wrong here?

From my understanding from the docs if i access props.values from inside a ponent instance, I should get an object describing the values in each field of the form.

values : Object

The current values of all the fields in the form.

In my case, I need to access a value, in order to redirect to something like

signup?email=theemailvalue

upon form submission.

However when I access the props.value I get an empty object.

What am I doing wrong here?

Share Improve this question edited Jun 20, 2020 at 9:12 CommunityBot 11 silver badge asked Mar 28, 2017 at 17:39 Dimitris KaragiannisDimitris Karagiannis 9,3969 gold badges45 silver badges74 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

As redux-form documentation, proper way to access form values is by formValueSelector

发布评论

评论列表(0)

  1. 暂无评论