0.2.0 • Published 1 month ago

react-formularium v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

React formularium

The React Formularium is a library under development that aims to be a simple and efficient solution for form management. It stands out for using native JavaScript data structures to save, update, and retrieve data, making it lightweight and performant.

Key Features:

  • Simplicity: The library offers an intuitive and easy-to-use API, ideal for beginners and experienced developers.
  • Efficiency: The use of native JavaScript data structures ensures superior performance and optimizes resource usage.
  • Flexibility: React Formularium is compatible with different types of forms and can be easily integrated into other projects.
  • Extensibility: The library provides customizable hooks that allow you to adapt the form's behavior to your specific needs.

Therefore, to save the form data, you could do the following:

const { data: formData } = useForm<Type of data>(initialdataObj);

<TextInput
  name="title"
  placeholder="Digite o titulo do anuncio"
  onChangeText={value => formData.set('title', value)}
/>

To get individual data:

const title = formData.get(title)

The function submitForm return all data as parameter to the callback function.

const onSubmit = async (formData: T) => {
  console.log(formData) // log an object with all form data
}

submitForm(onSubmit, rules)
0.2.0

1 month ago

0.1.3

10 months ago

0.1.2

11 months ago

0.1.1

11 months ago

0.1.0

11 months ago