How can i pass the data from redux form, So that i can access that data in App.js?
here is the code i have written using redux-form.after i click on submit the data should be passed from form.js to app.js. and the data should be displayed on page.
here is 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);
how can i pass this inputed data to app.js?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…