Why the need for another form library?
Let us set some facts about existing form libraries:
What does formxtra
offer?
formxtra
aims to simplify the syntax to just invoking two functions - getFormValues()
and setFormValues()
.formxtra
is not dependent to any library and is highly interoperable.formxtra
is dependent only to the DOM. Since accessing the DOM is fully synchronous, the same can be said for the
entire operation of formxtra
.formxtra
. For the library to do its intentions, it only requires
respecting the HTML DOM spec, such as providing names to inputs and binding them correctly to forms, which is what
all (data-driven) websites should do anyway.formxtra
is lightweight, even smaller than React Hook Form and Formik.formxtra
is already type-safe, being written in TypeScript and providing types, thanks to pridepack as a scaffold.What does formxtra
not offer?
formxtra
is not a validation library, nor does it provide utility functions for validation.
formxtra
in tandem with other validation libraries
such as ajv
or yup
for instance, by validating the values returned by getFormValues()
.formxtra
does not provide compatibility to custom components.
formxtra
does not guarantee it can work with them
out of the box.<input type="hidden">
element for each custom