
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
ImageViewer
Advanced tools
A pure JavaScript image viewer component for react-native apps with pan, pinch.etc, supporting both iOS and Android.
React Native required 0.33+


First, install react-native-image-viewer from npm:
npm install ImageViewer --save-dev
Or in package.json:
"dependencies": {
"ImageViewer": "version"
}
Then use it:
// ES6 mudule
import ImageViewer from 'ImageViewer';
There are some code from example/src/index.js:
let imgsArr = [
'http://scimg.jb51.net/allimg/160815/103-160Q509544OC.jpg',
'http://img.sc115.com/uploads1/sc/jpgs/1508/apic22412_sc115.com.jpg',
'http://h.hiphotos.baidu.com/zhidao/pic/item/0df431adcbef7609bca7d58a2adda3cc7cd99e73.jpg',
'http://facebook.github.io/react/img/logo_og.png',
'http://scimg.jb51.net/allimg/160815/103-160Q509544OC.jpg'
];
closeViewer(){
this.setState({
shown:false,
curIndex:0
})
}
<ImageViewer shown={this.state.shown}
imageUrls={imgsArr}
onClose={this.closeViewer.bind(this)}
index={this.state.curIndex}>
</ImageViewer>
| Opthion | Description | isRequired |
|---|---|---|
| shown | whether the ImageViewer is show | required |
| imageUrls | it's a array of images' url | required |
| onClose | hidden the ImageViewer when click on ImageViewer | required |
| index | the index of image url(in imageUrls) when open the ImageViewer | required |
| failedUrl | the url for image preview loaded failure | not required |
MIT
FAQs
A pure JavaScript image viewer component for react-native apps
We found that ImageViewer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.