【发布时间】:2019-01-11 18:47:24
【问题描述】:
Warning: React does not recognize the `initialValue` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `initialvalue` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
in input (created by PostsNew)
in div (created by PostsNew)
in form (created by PostsNew)
in PostsNew (created by ReduxForm(PostsNew))
in ReduxForm(PostsNew) (created by Connect(ReduxForm(PostsNew)))
in Connect(ReduxForm(PostsNew)) (created by ReduxFormConnector(PostsNew))
in ReduxFormConnector(PostsNew) (created by ConnectedForm)
in ConnectedForm (created by RouterContext)
in div (created by App)
in App (created by RouterContext)
in RouterContext (created by Router)
in Router
当我将{...title} 或{...categories} 或{...content} 添加到输入标签时,我收到了上述错误。
我在我的代码中指的是这一行。
https://github.com/justlearncode/REACT-REDUX-FORM/blob/master/src/components/posts_new.js#L25
这里有两张截图。
如果有帮助,您可以下载我的项目并在下面的链接中进行测试。 https://github.com/justlearncode/REACT-REDUX-FORM
我该如何解决这个问题?感谢您在正确方向上的任何帮助。
【问题讨论】:
-
请在问题中以文本格式包含所有相关代码和错误消息,而不是链接到外部资源。
标签: javascript node.js reactjs redux-form