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
- Host: GitHub
- URL: https://github.com/xcarpentier/react-native-safe-image
- Owner: xcarpentier
- License: mit
- Created: 2018-12-20T17:07:50.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T01:14:16.000Z (about 2 years ago)
- Last Synced: 2024-10-25T12:50:42.089Z (3 months ago)
- Topics: image, react-native, typescript
- Language: TypeScript
- Size: 809 KB
- Stars: 28
- Watchers: 3
- Forks: 1
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-react-native - react-native-safe-image ★13 - Really light React-Native package to handle fallback when image is on error (Components / Media)
- awesome-react-native - react-native-safe-image ★13 - Really light React-Native package to handle fallback when image is on error (Components / Media)
- awesome-react-native - react-native-safe-image ★13 - Really light React-Native package to handle fallback when image is on error (Components / Media)
- awesome-react-native - react-native-safe-image ★13 - Really light React-Native package to handle fallback when image is on error (Components / Media)
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)!