Skip to content

react-radio: update context usage#22803

Merged
spmonahan merged 2 commits into
microsoft:masterfrom
spmonahan:radio/context
May 3, 2022
Merged

react-radio: update context usage#22803
spmonahan merged 2 commits into
microsoft:masterfrom
spmonahan:radio/context

Conversation

@spmonahan

Copy link
Copy Markdown
Contributor

Current Behavior

RadioGroup passes context to its render function via state.

New Behavior

Context is removed from RadioGroup state and passed into its render function as a separate object.

Prior Art

Related Issue(s)

Fixes #22100

@fabricteam

fabricteam commented May 3, 2022

Copy link
Copy Markdown
Collaborator

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-radio
Radio
23.534 kB
7.892 kB
29.333 kB
10.031 kB
5.799 kB
2.139 kB
react-radio
RadioGroup
8.205 kB
3.516 kB
13.566 kB
5.451 kB
5.361 kB
1.935 kB

🤖 This report was generated against f542a2a06d0b71bb5c9bd19fed0a8c08ee6b2b0f

@size-auditor

size-auditor Bot commented May 3, 2022

Copy link
Copy Markdown

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: f542a2a06d0b71bb5c9bd19fed0a8c08ee6b2b0f (build)

@fabricteam

fabricteam commented May 3, 2022

Copy link
Copy Markdown
Collaborator

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 870 892 5000
Button mount 511 501 5000
FluentProvider mount 1772 1759 5000
FluentProviderWithTheme mount 307 262 10
FluentProviderWithTheme virtual-rerender 229 236 10
FluentProviderWithTheme virtual-rerender-with-unmount 344 299 10
MakeStyles mount 1494 1447 50000

Per: microsoft#22100
Radio and RadioGroup have an updated context.
@codesandbox-ci

codesandbox-ci Bot commented May 3, 2022

Copy link
Copy Markdown

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.

Latest deployment of this branch, based on commit 9204dc2:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

Comment thread packages/react-radio/src/index.ts Outdated
@spmonahan spmonahan merged commit 9132814 into microsoft:master May 3, 2022
marwan38 pushed a commit to marwan38/fluentui that referenced this pull request Jun 13, 2022
* react-radio: update context usage

Per: microsoft#22100
Radio and RadioGroup have an updated context.

* Update packages/react-radio/src/index.ts

Co-authored-by: Makoto Morimoto <[email protected]>

Co-authored-by: Makoto Morimoto <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RadioGroup should use context selectors & context values

5 participants