我如何从redux表单传递数据,以便我可以在App.js中访问该数据?这里是我用redux-form编写的代码.在我点击提交后,数据应该从form.js传递给app.js. 并且数据应显示在页面上.
这是form.js-
const Form=({fields:{name,address}})=>(
<form>
<center>
<div>
<label>First Name</label>
<Field type="text" component="input" placeholder="Name" name="name"/>
</div>
<div>
<label>Address</label>
<Field type="text" component="input" placeholder="Phone" name="phone" />
</div>
<button type="submit">Submit</button>
</center>
</form>
)
export default reduxForm({
form: 'form',
fields: ['name', 'address']
})(Form);
Run Code Online (Sandbox Code Playgroud)
我怎样才能将这些输入的数据传递给app.js?