-
-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Is your feature request related to a problem? Please describe.
I'd like a Svelte implementation of react-hook-form. I'd like to expose corresponding register
hooks that can automatically bind an input element to a store and automatically track changes while optimizing updates.
Describe the solution you'd like
There's an existing implementation of a framework agnostic core library that I'd like to extend. I'd like to use it to build out a proof of concept for Svelte.
I've implemented a version of @hookform/core
from the ground up with vanilla JS in mind. Using this core, I built @hookform/react
and passed all of the related tests from react-hook-form. My work can be found here: https://github.com/ap0nia/forms.js/tree/main/packages/react
Describe alternatives you've considered
I'm not a big fan of existing solutions for Svelte because it's either type-unsafe or heavily relies on two-way data binding, which is too opaque for my needs.
Additional context
This issue is forwarded from an issue I made at the core library because I'm not sure how visible it is there.
I think a possible point of difficult is divergence of the hookform/core
library and its dependents from the main react-hook-form library, since I wrote everything from scratch to emulate the same external behavior, but not necessarily the internals. I'm willing handle the maintenance burden if it enables hookform to be applicable more widely.
I was just really interested in hearing thoughts about this topic, thanks!