CodeyBoi / CodeyBoi/appendix3

Extract all forms into their own component

Open
#62 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
5
Forks
1
Avg merge
15m
Merged PRs (30d)
21

Description

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.

Contributor guide

Open the contributing guide

Research direction

Start by locating the page-level forms and their form.setValues calls, then identify each form that should become its own component. Pass the fetched data into those components and set initialValues from the props; done means form.isDirty correctly reflects edits across all extracted forms.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.