ngrx-clean-forms
TypeScript icon, indicating that this package has built-in type declarations

6.1.0 • Public • Published

ngrx-clean-forms

npm version codecov license

This framework takes an opinionated approach to managing forms. Following goals were set while composing this framework:

  • The complete state of a form should be leveraged to be in one central place (NgRx store).
  • The state of a form should be as minimal as possible. Every value that can be calculated from the minimal values of the state is not in the state, but instead retrieved in an abstraction function (selector). A prime example for this are errors, which are based on validators.
  • The state of a form can be manipulated in any way, as the values in it do not depend on each other. Updates can be applied manually or with functions provided by the framework.
  • The whole data flow (actions + selectors) between the form state and the actual form should be manually set by the user. No magic.
  • Types are available at every point of interaction with the form.

While all of these goals were met during the implementation of this framework, it comes at the same cost as NgRx. The necessary boilerplate code in comparison to Reactive Forms is significantly larger.

Getting Started Guide

Example Application

Official Docs

Package Sidebar

Install

npm i ngrx-clean-forms

Weekly Downloads

3

Version

6.1.0

License

MIT

Unpacked Size

502 kB

Total Files

62

Last publish

Collaborators

  • niklaspor