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 submit handlers #39

Open
m4v15 opened this issue Jan 14, 2018 · 0 comments
Open

redux form submit handlers #39

m4v15 opened this issue Jan 14, 2018 · 0 comments

Comments

@m4v15
Copy link

m4v15 commented Jan 14, 2018

Again, amazing work on using redux form, like I say, I've heard a lot of stories of people struggling with it, but looking at your stuff and the docs this looks pretty solid (although I am also new to it). One thing that jumped out to me was how you were passing in the submit handlers - such as here, or here and then binding this to the in built(?) handleSubmit prop from redux-form (here and here. The bind looked weird to me seeing as your using connect etc, so I had a mess around and instead of creating those new methods you can just pass in your functions straight into submit and it seems to work fine on my machine: onSubmit={handleSubmit(this.props.checkUrl).

CAVEAT I'm pretty sure this is better practice, and couldn't see anything in redux-form docs to indicate otherwise but there appears to be a fair bit of discussion around it so maybe you were aware of this and have done it for a reason? Anyway thought it was still worth mentioning to you all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant