mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Refactor Image to log component stacktraces for images rendering non-fb sources
Summary: This diff refactors the Image component in order to log the component hierarchy stacktraces for images rendering non-fb sources Changelog: [Internal] internal Reviewed By: fkgozali Differential Revision: D30504483 fbshipit-source-id: 1e41a67d5b9643730360bce7e787ee3427d931e8
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2abacace54
commit
8da6964d80
@@ -12,6 +12,7 @@ import DeprecatedImagePropType from '../DeprecatedPropTypes/DeprecatedImagePropT
|
||||
import * as React from 'react';
|
||||
import StyleSheet from '../StyleSheet/StyleSheet';
|
||||
|
||||
import ImageInjection from './ImageInjection';
|
||||
import ImageAnalyticsTagContext from './ImageAnalyticsTagContext';
|
||||
import flattenStyle from '../StyleSheet/flattenStyle';
|
||||
import resolveAssetSource from './resolveAssetSource';
|
||||
@@ -168,6 +169,11 @@ Image = React.forwardRef<
|
||||
ImagePropsType,
|
||||
React.ElementRef<typeof ImageViewNativeComponent>,
|
||||
>(Image);
|
||||
|
||||
if (ImageInjection.unstable_createImageComponent != null) {
|
||||
Image = ImageInjection.unstable_createImageComponent(Image);
|
||||
}
|
||||
|
||||
Image.displayName = 'Image';
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user