feat(react-radio): expose base state hooks for Radio components#35894
Open
dmytrokirpa wants to merge 3 commits intomicrosoft:masterfrom
Open
feat(react-radio): expose base state hooks for Radio components#35894dmytrokirpa wants to merge 3 commits intomicrosoft:masterfrom
dmytrokirpa wants to merge 3 commits intomicrosoft:masterfrom
Conversation
d44390e to
3ee2f22
Compare
3ee2f22 to
9ea7805
Compare
📊 Bundle size reportUnchanged fixtures
|
|
Pull request demo site: URL |
1 task
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.

This pull request introduces a new set of "base" state hooks and types for the Radio and RadioGroup components in
@fluentui/react-radio. These changes make it easier for consumers to access and work with the core state logic of these components, separate from design-specific properties likelayout. The update also includes the necessary exports and type definitions to support these new hooks and types throughout the package.API Additions and Exports:
RadioBasePropsandRadioBaseStatetypes, anduseRadioBase_unstablehook for the Radio component, allowing consumers to work with the base state logic independent of design-specific properties. [1] [2] [3] [4] [5] [6] [7] [8]RadioGroupBasePropsandRadioGroupBaseStatetypes, anduseRadioGroupBase_unstablehook for the RadioGroup component, similarly exposing the base state logic. [1] [2] [3] [4] [5] [6] [7] [8]renderRadio_unstableandrenderRadioGroup_unstableto accept the new base state types, aligning rendering logic with the new state separation. [1] [2]Refactoring and Internal Consistency:
useRadio_unstableanduseRadioGroup_unstablehooks to delegate to their base counterparts, then add design-specific properties (likelayoutor label rendering) as needed. [1] [2]These changes provide greater flexibility and composability for consumers who need to build custom radio or radio group components on top of Fluent UI's core logic.