Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/459.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 以redux形式为输入提供默认值_Javascript_Reactjs_Redux_Redux Form - Fatal编程技术网

Javascript 以redux形式为输入提供默认值

Javascript 以redux形式为输入提供默认值,javascript,reactjs,redux,redux-form,Javascript,Reactjs,Redux,Redux Form,我会认为这是愚蠢的容易。。。但我在挣扎:D <Field type="text" component="input" value="jamie" name="email" placeholder="Enter email address"/> <Field type="text" component="input" defaultValue="jamie" name="email" placeholder="Enter email address"/>

我会认为这是愚蠢的容易。。。但我在挣扎:D

    <Field type="text" component="input" value="jamie" name="email" placeholder="Enter email address"/>
    <Field type="text" component="input" defaultValue="jamie" name="email" placeholder="Enter email address"/>
    <Field type="text" component="input" format="jamie" name="email" placeholder="Enter email address"/>


我就是找不到一个。

在你的课堂之外定义
initialValues

const initialValues = {
  email: 'example@gmail.com'
}
在这里输入初始值

export default reduxForm({
  form: 'venues',  // a unique identifier for this form
  destroyOnUnmount: true,
  validate,
  initialValue
})(VenueComponent)

啊,非常好!谢谢你,巴德。现在我只需要解决如何从props@JamieHutber嘿,你知道怎么做了吗?