Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redux-form and create-react-app not working #325

Closed
nguyenchanhnghia opened this issue Aug 2, 2016 · 3 comments
Closed

redux-form and create-react-app not working #325

nguyenchanhnghia opened this issue Aug 2, 2016 · 3 comments

Comments

@nguyenchanhnghia
Copy link

nguyenchanhnghia commented Aug 2, 2016

I using create-react-app and redux-form but is not working.
inside form i define const {fields: {email, password, captcha}, handleSubmit} = this.props;
and in input
<input name="email" class="form-control" type ="text" {...email}/> but when i submit form this error. How i can use redux form in app.
screenshot from 2016-07-26 11_41_21

@tbash
Copy link

tbash commented Aug 2, 2016

@nguyenchanhnghia This is actually due to the React version being over 15.2.0
As discussed here: redux-form/redux-form#1249 (comment) @gaearon states, to read this: https://github.com/erikras/redux-form/releases/tag/v6.0.0-rc.2 as it contains the solution.

In short, update to version 6.0.0-rc.2 or higher of redux-form, read about upgrading from v5 to v6 here: http://redux-form.com/6.0.0-rc.1/docs/MigrationGuide.md/ and instead of spreading props in the renderField function, pass in field, spread field.input, and use field where you would have used props.

@mxstbr mxstbr closed this as completed Aug 2, 2016
@nguyenchanhnghia
Copy link
Author

@tbash thanks for support.

@tbash
Copy link

tbash commented Aug 3, 2016

@nguyenchanhnghia you're welcome.

Also there are additional breaking changes here: https://github.com/erikras/redux-form/releases/tag/v6.0.0-rc.4

If you're interested in sticking with the stable version (v5) you can use this: redux-form/redux-form#1441 (comment)

@lock lock bot locked and limited conversation to collaborators Jan 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants