问题标签 [redux-form]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
79 浏览

reactjs - Redux-form : 从带有联锁组件的自定义表单中获取信息

我正在使用来自: http ://redux-form.com/4.2.0 的 redux-form ,我尝试了简单的联系表单示例,您可以在此处看到:

它工作得很好,但我想分离我的组件来创建带有自定义块的表单,例如我在这里创建了一个标题块:

我想将此 TitleBlock 与我的联系表格互锁,是否可以这样做并在一个提交功能中管理所有信息?

0 投票
1 回答
483 浏览

reactjs - 单个字段上有多个错误的 redux-form

使用react-redux,如何为单个输入呈现多个错误的列表?

从那里的例子:

是否可以执行以下操作?

提前致谢。

0 投票
2 回答
3827 浏览

reactjs - React Native 中出现键盘时如何移动视图?

当 TextInput 成为焦点时,键盘将隐藏提交按钮。如何在 TextInput 下方自动滑动组件

0 投票
1 回答
970 浏览

javascript - Redux-Form Understanding Multipage Form Ajax PUT

Preface: I'm a rails developer that is familiar enough with Javascript to write basic things but my overall understanding of the frameworks in question react + react-redux + redux-form may be insufficient. I'm still working on that.

Task to Accomplish: I'm trying to implement a multiple page form using redux-form. I have the multiple page form working. I now need to post all three pages of the wizard's values in one XHR request.

The Problem: I'm following the example of the multipage Wizard form in the redux-form documentation: http://redux-form.com/4.2.0/#/examples/wizard?_k=h898k7

However, I don't seem to understand where an XHR request should be handled. This may be a fundamental misunderstanding of react and react-redux. I see they have an onSubmit function passed to each wizard page from WizardForm.js parent component, but I don't think I understand where WizardForm.js is getting that onSubmit function nor what the shape of that function would be if the goal is to accomplish an XHR PUT request on WizardFormThirdPage.js.

Also, though the goal of the form submission isn't (yet) to change any of the redux store's state, would it be rational to make an action that does the XHR when something is dispatched like 'SUBMIT_FORM'?

0 投票
1 回答
1019 浏览

reactjs - 可重用组件的 redux-form 验证

嘿,我尝试使用 reduxform 验证并对可在表单中重复使用并多次调用的组件应用验证。

但我最终将所有的补偿都绑定在一起。不在他们自己的范围内。

比较:

我尝试在名称中使用“[]”,但最终得到了 X 组件的 X 数组。所以 '[]' 似乎应该用于列表而不是同一组件的新实例。

谢谢!

0 投票
1 回答
4300 浏览

reactjs - 处理 React/Redux 表单中的提交

我想在用户提交表单时捕获表单值。React 教程显示了这一点:

这种风格通过每个输入的处理函数将所有更改推入状态。如果我要全面使用 Redux,我相信我会在其中添加动作和动作创建者,这似乎是很多开销。

注意参数 tohandleSubmit是一个事件。

我遇到了以下 React/Redux 入门工具包,它看起来更容易使用。它使用智能/容器组件和哑/演示组件组合:

容器

表现性的

我不清楚的是,为什么表单处理程序的onSubmit处理程序会为其 Facebook 教程的参数接收一个事件,但为什么入门工具包的onSubmit处理程序正在获取表单数据......入门工具包正在利用该redux-form包,但我看不到它直接影响该处理程序的行为方式。

0 投票
1 回答
573 浏览

javascript - redux-form 方法“PUT”中的 500(内部服务器错误)

我的反应应用程序中的 PUT 请求有一些问题。我正在使用带有标准提取请求的 redux-form。当我发送请求时出现错误:PUT http://localhost:8080/auth 500 (Internal Server Error) "SyntaxError: Unexpected token <" 有我的获取代码:

它有什么问题?

0 投票
3 回答
894 浏览

reactjs - Redux-Form 未运行 mapStateToProps 函数

redux-form 文档说装饰器接受一个必需参数(配置对象)和四个可选参数(在 react-redux 中reduxForm()传递给装饰器的四个参数相同)。connect但是,当我将mapStateToProps()函数作为参数传递给reduxForm()装饰器时,mapStateToProps()实际上并没有运行。请参阅下面的简化代码示例。解释器永远不会到达debugger语句。我对 redux-form 文档有误解吗?

0 投票
2 回答
383 浏览

reactjs - Redux 表单变量

这是包中的一个Simple Form示例redux-form。我很困惑变量firstName来自哪里。我在 ES6 语法中遗漏了什么吗?

0 投票
2 回答
2657 浏览

reactjs - Redux 表单句柄提交数据为空

问题

表单的数据在提交时没有传递给handleSubmit()函数。我究竟做错了什么?

形式

表单的父级