Skip to content

refactor: convert Radio and RadioGroup to functional components#6914

Merged
tujoworker merged 13 commits intov11from
refactor/radio-to-functional
Apr 5, 2026
Merged

refactor: convert Radio and RadioGroup to functional components#6914
tujoworker merged 13 commits intov11from
refactor/radio-to-functional

Conversation

@langz
Copy link
Copy Markdown
Contributor

@langz langz commented Mar 4, 2026

No description provided.

@codesandbox-ci
Copy link
Copy Markdown

codesandbox-ci bot commented Mar 4, 2026

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.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 4, 2026

Branch Preview URL (stable):
https://refactor-radio-to-functional.eufemia-e25.pages.dev

https://refactor-radio-to-functional.eufemia-e25.pages.dev

Deployment URL (unique):
https://cd1fccac.eufemia-e25.pages.dev

https://cd1fccac.eufemia-e25.pages.dev

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 4, 2026

commit: 9407d08

@langz langz force-pushed the refactor/radio-to-functional branch from b6d8d02 to 61fa3da Compare March 4, 2026 20:55
@langz langz requested a review from tujoworker March 6, 2026 12:49
@langz langz force-pushed the refactor/radio-to-functional branch 7 times, most recently from 8f7984a to 51f3c04 Compare March 16, 2026 09:11
@langz langz force-pushed the refactor/radio-to-functional branch 5 times, most recently from 2edc512 to 0ada2f2 Compare March 19, 2026 08:38
@langz langz force-pushed the refactor/radio-to-functional branch from 0ada2f2 to a230b3f Compare March 24, 2026 13:26
Comment thread packages/dnb-eufemia/src/components/radio/RadioGroup.tsx Outdated
Comment thread packages/dnb-eufemia/src/components/radio/RadioGroup.tsx Outdated
@langz langz force-pushed the refactor/radio-to-functional branch from a230b3f to def224a Compare March 26, 2026 12:55
@tujoworker tujoworker force-pushed the refactor/radio-to-functional branch from def224a to 6483775 Compare April 5, 2026 05:37
langz added 9 commits April 5, 2026 07:57
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.
@tujoworker tujoworker force-pushed the refactor/radio-to-functional branch from 6483775 to 9407d08 Compare April 5, 2026 05:59
@tujoworker tujoworker merged commit d21e64b into v11 Apr 5, 2026
11 checks passed
@tujoworker tujoworker deleted the refactor/radio-to-functional branch April 5, 2026 06:48
@tujoworker
Copy link
Copy Markdown
Member

Did test things manually. Worked as expected/before.

tujoworker added a commit that referenced this pull request Apr 5, 2026
tujoworker added a commit that referenced this pull request Apr 5, 2026
tujoworker added a commit that referenced this pull request Apr 5, 2026
tujoworker added a commit that referenced this pull request Apr 6, 2026
tujoworker added a commit that referenced this pull request Apr 6, 2026
tujoworker added a commit that referenced this pull request Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants