-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Remove useTheme export #23335
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
Remove useTheme export #23335
Conversation
| Pick<FluentProviderProps, 'targetDocument'> & | ||
| Required<Pick<FluentProviderProps, 'dir'>> & { | ||
| theme: Theme | Partial<Theme> | undefined; | ||
| theme: ThemeContextValue; |
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.
There were 5 or 6 instances of this specific typing, so I extracted it.
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.
Is this related to the useTheme change?
📊 Bundle size reportUnchanged fixtures
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 287cf6769bda0ca0ec7cd29b01a4a4481a488d92 (build) |
miroslavstastny
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.
We should go with #23325 instead.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
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 6ad5978:
|
| @@ -1,4 +1,5 @@ | |||
| export { ThemeContext, useTheme } from './ThemeContext'; | |||
| export { ThemeContext } from './ThemeContext'; | |||
| export type { ThemeContextValue } from './ThemeContext'; | |||
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.
in #23325 we are moving react-shared-contexts to unstable. Does this have any effect on exporting this type from the unstable package?
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 1225 | 1219 | 5000 | |
| Button | mount | 767 | 737 | 5000 | |
| FluentProvider | mount | 2231 | 2219 | 5000 | |
| FluentProviderWithTheme | mount | 388 | 393 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 355 | 359 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 422 | 405 | 10 | |
| MakeStyles | mount | 2024 | 1985 | 50000 |
* remove useTheme from exports * run yarn change * fix bad merge * fix type export * remove export useTheme * update react-provider change json * update react-provider api snapshot Co-authored-by: Sean Monahan <[email protected]>


This PR removes the
useThemeexport as it is no longer needed. If you need access to design tokens, import them directly: