refactor: convert Radio and RadioGroup to functional components#6914
Merged
tujoworker merged 13 commits intov11from Apr 5, 2026
Merged
refactor: convert Radio and RadioGroup to functional components#6914tujoworker merged 13 commits intov11from
tujoworker merged 13 commits intov11from
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
|
Branch Preview URL (stable): Deployment URL (unique): |
commit: |
b6d8d02 to
61fa3da
Compare
8f7984a to
51f3c04
Compare
2edc512 to
0ada2f2
Compare
0ada2f2 to
a230b3f
Compare
tujoworker
approved these changes
Mar 24, 2026
a230b3f to
def224a
Compare
def224a to
6483775
Compare
The original class component extended React.PureComponent which provides shallow prop comparison. React.memo is the functional equivalent.
Replace ownProps/groupContext objects in useCallback dependency arrays with ref patterns. Since these objects are new on every render, they defeated memoization. Using refs ensures stable callbacks while still accessing the latest props at call time.
…RadioGroup Explains why onlyMergeExistingProps: true is needed to prevent context props from leaking to DOM attributes.
6483775 to
9407d08
Compare
Member
|
Did test things manually. Worked as expected/before. |
tujoworker
added a commit
that referenced
this pull request
Apr 5, 2026
Co-authored-by: Tobias Høegh <tobias@tujo.no>
tujoworker
added a commit
that referenced
this pull request
Apr 5, 2026
Co-authored-by: Tobias Høegh <tobias@tujo.no>
tujoworker
added a commit
that referenced
this pull request
Apr 5, 2026
Co-authored-by: Tobias Høegh <tobias@tujo.no>
tujoworker
added a commit
that referenced
this pull request
Apr 6, 2026
Co-authored-by: Tobias Høegh <tobias@tujo.no>
tujoworker
added a commit
that referenced
this pull request
Apr 6, 2026
Co-authored-by: Tobias Høegh <tobias@tujo.no>
tujoworker
added a commit
that referenced
this pull request
Apr 6, 2026
Co-authored-by: Tobias Høegh <tobias@tujo.no>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.