Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/xcarpentier/react-native-safe-image

Really light React-Native package to handle fallback when image is on error
https://github.com/xcarpentier/react-native-safe-image

image react-native typescript

Last synced: 2 months ago
JSON representation

Really light React-Native package to handle fallback when image is on error

Lists

README

        

[![NPM version](https://badge.fury.io/js/react-native-safe-image.svg)](http://badge.fury.io/js/react-native-safe-image)

# react-native-safe-image

Really light React-Native package to handle fallback when image is on error

- fallback to **other image**
- fallback to **a component**

## How to use it ?
`yarn add react-native-safe-image`

```jsx
import { SafeImage } from 'react-native-safe-image'

// ...
render() {
return (

)
}
// ... or ...
const noImg = No Img
render() {
return (

)
}

```

## Todos

- [x] add `fallbackComponent` prop

## Hire an expert!
Looking for a ReactNative freelance expert with more than 12 years experience? Contact me from my [website](https://xaviercarpentier.com)!