File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @emotion/react ' : patch
3
+ ---
4
+
5
+ Added display names to public React contexts in development builds. This helps to recognize them in React Developer Tools.
Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ let EmotionCacheContext: React.Context<EmotionCache | null> =
18
18
: null
19
19
)
20
20
21
+ if ( process . env . NODE_ENV !== 'production' ) {
22
+ EmotionCacheContext . displayName = 'EmotionCacheContext'
23
+ }
24
+
21
25
export let CacheProvider = EmotionCacheContext . Provider
22
26
23
27
export let __unsafe_useEmotionCache =
Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ import weakMemoize from '@emotion/weak-memoize'
4
4
import hoistNonReactStatics from './isolated-hoist-non-react-statics-do-not-use-this-in-your-code'
5
5
6
6
export const ThemeContext = /* #__PURE__ */ React . createContext < Object > ( { } )
7
+ if ( process . env . NODE_ENV !== 'production' ) {
8
+ ThemeContext . displayName = 'EmotionThemeContext'
9
+ }
7
10
8
11
export const useTheme = ( ) => React . useContext ( ThemeContext )
9
12
You can’t perform that action at this time.
0 commit comments