MobX Forms

MobX Forms is a collection of loosely-coupled components for managing, rendering and validating forms in MobX-based apps.

Components:

Component Description
FormStore Instances of FormStore (models) store the data entered by the user into form fields and provide observables for managing validation error messages. They also track changes and provide facilities for (auto-)saving the (changed) data.
<MobxSchemaForm>, etc React components Renders form widgets (by default using React-Toolbox (Material Design)) based on schema and form definition in json-schema-form format. Includes intelligent real-time validation and display of validation error message in each widget.
validateForm() Should be used in an afterRefresh hook provided by FormStore to populate the model with defaults if they are defined in the schema.
modules-values-extract Build-time utility for managing React-Toolbox 2.x theme variables

Features:

  • Lightweight with minimal API surface
  • Model data is in plain object which makes it easy to manipulate and integrate with other code
  • Form rendering and validation is declarative
  • Focus on high usability and excellent end-user experience
  • Very little code is needed for a complete implementation
  • Low-level facilities are available for easy implementation of custom widgets, custom validation, etc.

See each of the main components above for more detailed features of each component.

Demo

https://am.net/mobx-forms-demo/

Source for demo is at https://github.com/alexhisen/mobx-forms-demo

results matching ""

    No results matching ""