question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ReactNative ImageBackground

See original GitHub issue

As of ReactNative 0.46 using, it’s recommended to use ImageBackground component whenever Image has children. This is possible using CustomImageCache component as follow:

<CustomCachedImage
    component={ImageBackground}
    source={{ uri: 'http://loremflickr.com/640/480/dog' }} 
/>

Although if there is a directly available component name CachedImageBackground to import then it would be great.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
wcandilloncommented, Sep 6, 2017

Thks a lot 👍🏻

1reaction
shahankitcommented, Sep 6, 2017

I get a console warning whenever using <Image /> with children to use <ImageBackground /> instead. I found this in documentation for ImageBackground: http://facebook.github.io/react-native/releases/0.48/docs/images.html#background-image-via-nesting

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImageBackground - React Native
A common feature request from developers familiar with the web is background-image . To handle this use case, you can use the <ImageBackground> ......
Read more >
How to use ImageBackground to set background image for ...
To add background Image, React Native is based on component, the ImageBackground Component requires two props style={{}} and ...
Read more >
Set a component's background image - Expo Documentation
The ImageBackground component lets you display an image as the background of another component in Expo and React Native apps. For example, you...
Read more >
ImageBackground // React Native for Web - GitHub Pages
ImageBackground. An image component with support for child content. import { ImageBackground } from 'react-native';
Read more >
How to set Background Image in react-native ? - GeeksforGeeks
In BackgroundImage.js, we will import ImageBackground component from react-native. It takes following props: source: Source of Image to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found