Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decide on a common generic value type #1076

Open
vladmoroz opened this issue Dec 12, 2024 · 0 comments
Open

Decide on a common generic value type #1076

vladmoroz opened this issue Dec 12, 2024 · 0 comments

Comments

@vladmoroz
Copy link
Contributor

vladmoroz commented Dec 12, 2024

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:

@vladmoroz vladmoroz changed the title Decide on a common generic value type Decide on a common generic value type Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant