diff --git a/Libraries/Components/ScrollView/ScrollViewContext.js b/Libraries/Components/ScrollView/ScrollViewContext.js index f774483912d928..894d7f0a56555d 100644 --- a/Libraries/Components/ScrollView/ScrollViewContext.js +++ b/Libraries/Components/ScrollView/ScrollViewContext.js @@ -15,7 +15,9 @@ import * as React from 'react'; type Value = {horizontal: boolean} | null; const ScrollViewContext: React.Context = React.createContext(null); - +if (__DEV__) { + ScrollViewContext.displayName = 'ScrollViewContext'; +} export default ScrollViewContext; export const HORIZONTAL: Value = Object.freeze({horizontal: true}); diff --git a/Libraries/Image/ImageAnalyticsTagContext.js b/Libraries/Image/ImageAnalyticsTagContext.js index ea458bf0c28043..540ae6c02db72d 100644 --- a/Libraries/Image/ImageAnalyticsTagContext.js +++ b/Libraries/Image/ImageAnalyticsTagContext.js @@ -18,4 +18,8 @@ const Context: React.Context = React.createContext( null, ); +if (__DEV__) { + Context.displayName = 'ImageAnalyticsTagContext'; +} + export default Context; diff --git a/Libraries/Lists/VirtualizedListContext.js b/Libraries/Lists/VirtualizedListContext.js index 130315a1b08d57..eddb578ed714c1 100644 --- a/Libraries/Lists/VirtualizedListContext.js +++ b/Libraries/Lists/VirtualizedListContext.js @@ -69,6 +69,9 @@ type Context = $ReadOnly<{ export const VirtualizedListContext: React.Context = React.createContext( null, ); +if (__DEV__) { + VirtualizedListContext.displayName = 'VirtualizedListContext'; +} /** * Resets the context. Intended for use by portal-like components (e.g. Modal). diff --git a/Libraries/ReactNative/RootTag.js b/Libraries/ReactNative/RootTag.js index 24b151544d43b2..e36cafd5744e33 100644 --- a/Libraries/ReactNative/RootTag.js +++ b/Libraries/ReactNative/RootTag.js @@ -19,6 +19,10 @@ export const RootTagContext: React$Context = React.createContext element. */ -module.exports = (React.createContext(false): React$Context<$FlowFixMe>); +const TextAncestorContext = (React.createContext( + false, +): React$Context<$FlowFixMe>); +if (__DEV__) { + TextAncestorContext.displayName = 'TextAncestorContext'; +} +module.exports = TextAncestorContext; diff --git a/Libraries/Utilities/PerformanceLoggerContext.js b/Libraries/Utilities/PerformanceLoggerContext.js index 5bc3560f0fe1b9..e32f6c249e731b 100644 --- a/Libraries/Utilities/PerformanceLoggerContext.js +++ b/Libraries/Utilities/PerformanceLoggerContext.js @@ -23,4 +23,7 @@ import type {IPerformanceLogger} from './createPerformanceLogger'; const PerformanceLoggerContext: React.Context = React.createContext( GlobalPerformanceLogger, ); +if (__DEV__) { + PerformanceLoggerContext.displayName = 'PerformanceLoggerContext'; +} module.exports = PerformanceLoggerContext;