-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat(react-utilities): extend Slot to support VoidFunctionComponents
#23408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(react-utilities): extend Slot to support VoidFunctionComponents
#23408
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. Latest deployment of this branch, based on commit 9885b32:
|
📊 Bundle size reportUnchanged fixtures
|
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 1745 | 917 | 5000 | Possible regression |
| FluentProviderWithTheme | mount | 249 | 677 | 10 | Possible regression |
All results
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 1745 | 917 | 5000 | Possible regression |
| Button | mount | 572 | 558 | 5000 | |
| FluentProvider | mount | 1735 | 1755 | 5000 | |
| FluentProviderWithTheme | mount | 249 | 677 | 10 | Possible regression |
| FluentProviderWithTheme | virtual-rerender | 220 | 222 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 257 | 302 | 10 | |
| MakeStyles | mount | 1554 | 1560 | 50000 |
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: eec5395ef1eabcfea6cf4c2ae48f928a35980694 (build) |
bsunderhus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, VoidFunctionComponent type is equivalent to FunctionComponent without forcing children on props.
Current Behavior
Our
Slottype does not currently support components that take nochildrenprop.New Behavior
Slotnow extendsVoidFunctionComponentto allow for such behavior.