Replies: 3 comments 2 replies
-
In the useForm hook, I am just now seeing this:
So let me try to use that to see if I can make a version of what I was thinking. |
Beta Was this translation helpful? Give feedback.
-
Hi Jake! It was great meeting you too. May I ask why you would prefer not to pass the props down to each field? If you are concern about the performance, then it should be fine as the field properties are stable and shouldn't trigger a re-render unless the error is changed similar to react-hook-form. (Note: The field object is not stable but you are suggested to spread them to each input anyway). This also allows you to have your custom inputs decoupled from the form library. |
Beta Was this translation helpful? Give feedback.
-
You can find an implementation of the |
Beta Was this translation helpful? Give feedback.
-
Hey Edmund! It was great meeting you at Remix Conf. I hope you make it back home safely and can rest.
I almost got a POC running in our project without too much refactoring, but one thing I ran into was not wanting to pass in the props to each field and instead looking for a useField hook.
Here's some pseudo-code of how I could see it being used:
Somehow useField could magically get that necessary field info for me without having to pass down props into each input.
Does this seem achievable?
Beta Was this translation helpful? Give feedback.
All reactions