You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
Improve the error message shown when you try to nest components in an
`<Image>` component by referencing the `<ImageBackground>` component.
It would be helpful if the error message displayed when you try to nest components in an `<Image>` component mentioned the `<ImageBackground>` component. Especially since this component is not yet well documented.
[IOS][MINOR][Libraries/Image/Image.ios.js] - Surfaced `<ImageBackground>` in error message
[ANDROID][MINOR][Libraries/Image/Image.android.js] - Surfaced `<ImageBackground>` in error message
Closes#16880
Differential Revision: D6369396
Pulled By: shergin
fbshipit-source-id: c4ae4dbb77d0fce6cbd7a42d1957d16112b24549
Copy file name to clipboardexpand all lines: Libraries/Image/Image.android.js
+1-1
Original file line number
Diff line number
Diff line change
@@ -274,7 +274,7 @@ var Image = createReactClass({
274
274
}
275
275
276
276
if(this.props.children){
277
-
thrownewError('The <Image> component cannot contain children. If you want to render content on top of the image, consider using absolute positioning.');
277
+
thrownewError('The <Image> component cannot contain children. If you want to render content on top of the image, consider using the <ImageBackground> component or absolute positioning.');
thrownewError('The <Image> component cannot contain children. If you want to render content on top of the image, consider using absolute positioning.');
377
+
thrownewError('The <Image> component cannot contain children. If you want to render content on top of the image, consider using the <ImageBackground> component or absolute positioning.');
0 commit comments