Getting Started
Introduction#
- Formst is the new way to create and handle forms. Unlike most form libraries that are UI-first, Formst is data first. It is based on MST(MobX-State-Tree). This library helps you create high-performance forms with interdependent fields within tables and add validations.
Note: Formst has peer dependencies and requires mobx, mobx-react-lite/mobx-react and mobx-state-tree.
Installation#
Use yarn or npm to install this library:
Basic Usage#
Create a form model:
Create an instance of the model:
Wrap the components inside Formst and use Field API to render the fields:
Optional: If you don't like
FieldAPI, you can directly plug this to an element.Note: For this to work, you need to wrap the entire component inside observer.