insin / insin/newforms

Externalising form state

Open
#40 0 comments 0 reactions 0 assignees View on GitHub
Enhancement
Dominant language
JavaScript
Stars
634
Forks
46
PR merge metrics
No merged PRs in 30d

Description

There's a cost associated with constantly recreating new form instances in that `YourForm.prototype.baseFIelds` gets deep -cloned to `yourFormInstance.fields` by the `BaseForm` constructor.

Having a means of externalising a form's working state would give the opportunity to avoid this where possible, plus make it easier to implement `shouldComponentUpdate()` when necessary by doing a `===` on the state object by recreating it every time it needs to change.

This would also enable using a single Form instance to validate & render multiple foirms. Reusing a single form instance could be a win for FormSets on the client.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.