我有一个redux-form组件,我正确地传入了initial form state values,但是当我在表单中单击时,我无法编辑这些值。我跟踪了所有的文档,如下面的链接:
我还按照文档实现了自定义input。
所以我想弄清楚我错过了什么?以下是我的表单组件:
EditJournalForm.jsx
import "./styles/list-item.scss";
import {Button, ButtonToolbar} from "react-bootstrap";
import {connect} from "react-redux
谢谢你花时间阅读这篇文章。
我正在尝试学习使用eslint和AirBnB配置一起使用react的类型记录。像映射对象数组和使用每个对象创建自定义函数组件这样简单的事情给了我下一个错误:
Argument of type '(product: ProductType) => JSX.Element' is not assignable to parameter of type '(value: object, index: number, array: object[]) => Element'.
下面是父组件ProductGrid:
const Pr
当我使用命令npm run build运行构建时,我遇到了这个问题
ERROR in ./src/app.jsx
Module parse failed: /Users/antongoncharov/apps/react-js-app/src/app.jsx Line 1: Unexpected token
You may need an appropriate loader to handle this file type.
| import React, React from 'react';
| import ReactDom from 'react-dom
下面是我的应用程序在ReactJS组件中呈现的行,并保存为nav.jsx。
<span style="font-family: 'Open Sans', sans-serif;"> Home</span>
例外:
Uncaught Error: The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}}