Skip to content

Commit b55e4b8

Browse files
committed
feat: Mark an ImageBackground component as deprecated (0.87.x+)
1 parent f5a5f3a commit b55e4b8

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

docs/imagebackground.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
---
22
id: imagebackground
3-
title: ImageBackground
3+
title: '🗑️ ImageBackground'
44
---
55

6+
:::warning[Deprecated]
7+
Use a `View` with an absolutely positioned `Image` instead.
8+
:::
9+
610
A common feature request from developers familiar with the web is `background-image`. To handle this use case, you can use the `<ImageBackground>` component, which has the same props as `<Image>`, and add whatever children to it you would like to layer on top of it.
711

812
You might not want to use `<ImageBackground>` in some cases, since the implementation is basic. Refer to `<ImageBackground>`'s [source code](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Image/ImageBackground.js) for more insight, and create your own custom component when needed.

website/versioned_docs/version-0.87/imagebackground.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
---
22
id: imagebackground
3-
title: ImageBackground
3+
title: '🗑️ ImageBackground'
44
---
55

6+
:::warning[Deprecated]
7+
Use a `View` with an absolutely positioned `Image` instead.
8+
:::
9+
610
A common feature request from developers familiar with the web is `background-image`. To handle this use case, you can use the `<ImageBackground>` component, which has the same props as `<Image>`, and add whatever children to it you would like to layer on top of it.
711

812
You might not want to use `<ImageBackground>` in some cases, since the implementation is basic. Refer to `<ImageBackground>`'s [source code](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Image/ImageBackground.js) for more insight, and create your own custom component when needed.

0 commit comments

Comments
 (0)