CodeyBoi / CodeyBoi/appendix3

Extract all forms into their own component

Offen
#62 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
TypeScript
Sterne
5
Forks
1
Ø Merge
15 Min.
Gemergte PRs (30 T.)
21

Beschreibung

Right now we have forms directly on the page, and we update the form fields by a call to `form.setValues`. This is problematic, as it makes `form.isDirty` not work correctly, as it only returns true if a field has been edited and is different from its `initialValue`.

The solution is to extract each form into a component. We can then in the parent component fetch the data and then pass the data as props, e.g. ``. We can then in the form component set the initialValues directly to the passed data.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.