Javascript 以redux形式为输入提供默认值
我会认为这是愚蠢的容易。。。但我在挣扎:DJavascript 以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"/>
<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嘿,你知道怎么做了吗?