Performance considerations: using meta.value vs control.value in Switch component example. #718
reborn2135
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
Using It would be awesome if you can help putting up a PR. Thanks! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Seeking Clarification on Switch Component Implementation
I hope this message finds you well. I've been studying the excellent examples provided in the conform repository, and I came across an interesting point in the shadcn Switch component example. I noticed that
meta.value
is being used directly, and I'm curious about the reasoning behind this choice.During my testing with React DevTools, I observed that the entire form was re-rendering each time the switch state changed. This observation led me to wonder if there might be potential for optimization.
Current Implementation
The Switch component currently uses
meta.value
:Beta Was this translation helpful? Give feedback.
All reactions