umami-software / umami-software/zen

FormFieldArray children property types are missing

Open
#8 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
58
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Hi!

Starting a new project and decided to run with react zen!
So far so good. I noticed that the built in form system isn't really type safe.

One of the thing is that the FormFieldArray children callback type is set to (props: any) => ReactNode.
It doesn't really reflect the types { append: () => void; remove: (index: number) => void; control; fields; }; leading to error on the consumer side:

Image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the FormFieldArray entry point and inspect the children callback type. Compare its current any-based signature with the append, remove, control, and fields shape described in the issue, then verify that a consumer receives those properties with useful types. Done means the callback no longer uses any and the reported consumer-side type error is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.