[all components] Decide on a common generic `value` type
- Dominant language
- TypeScript
- Stars
- 10.9k
- Forks
- 543
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 101
Description
Current situation:
value: any
- Select
- Menu Radio
- Menu Radio Group
- Toggle Group
- Tabs
value: unknown
- Field (in `validate` callback)
- Radio
- Radio Group
value: string
- Toggle Group
- Select.Value (in `children` render function)
***
My preferences/suggestions:
- We can't use `unknown` because it comes with a difficult DX
- `any` is OK but might be a footgun with non-primitive values causing unexpected rerenders due to different references. I could go either way though as it's more powerful too.
- Any potential issues with non-primitive values in forms?
- Toggle needs to align with whatever everything else is using
- Select.Value needs to use the actual `value` type for the `children` render function
**Search keywords**:
Contributor guide
Assessment
This issue has not been assessed yet.