-
Notifications
You must be signed in to change notification settings - Fork 13
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
Consider deprecating this in favor of @reach/component-component #5
Comments
@cloud-walker The |
Hi @jedrichards, I'm not sure of what your are talking about, can you provide an example? |
@cloud-walker Hmm, maybe I'm misunderstanding. As I understand it one of the use cases for How would you do that within |
@jedrichards you mean something like this: https://codesandbox.io/s/ww1lv6386k |
@cloud-walker Yeah exactly. Got it now - thanks! 🙇 |
@cloud-walker I'm trying to use your suggestion in my app to submit whenever a select field changes value and it works with Formik 1.3.X but not with 1.4.X. Somewhere in the Formik validation code (my form has no validation) it is setting isCanceled: true which I'm assuming keeps the handleSubmit() from getting called. More details on what's going on here: Here is the sandbox showing what I'm doing and that handleSubmit() doesn't get called with 1.4.1. If you change the Formik version to 1.3.2 it works. I posted here in case you might know what's going on. I really want to use Component Component in a few places in our app but this is a blocker. |
Hi, why you need to do |
Kind of an edge case to submit a form on a field change but in our real app we have a select field that when changed will make a REST call to filter the grid contents. I think it's a better experience to submit the form on change rather than making them select then hit a button. The sandbox is a dumb example but did show what was going on. Jared pointed me in a right direction and for this I'm not using Component-Component. There are some places where we need to update a field based on a value from another field so I want to try C-C there. Here is my solution for submitting on a select field change. |
First of all, thanks again for the amazing work on
formik
, I've recently upgraded it from 0.* to 1.3 without breaking changes 😲!I think this package brings not so much value considering more generic alternatives, like: https://ui.reach.tech/component-component
I propose to deprecate this redirecting the new users to the alternatives!
Comparison
vs
The difference is minimal and u can do it in other ways also (for example passing only the formikBag props you want to
Component
)The text was updated successfully, but these errors were encountered: