Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@luu-truong/react-native-image-viewer
Advanced tools
Yarn:
yarn add @luu-truong/react-native-image-viewer react-native-gesture-handler
NPM:
npm install @luu-truong/react-native-image-viewer react-native-gesture-handler
To complete installation you must following this guide to setup react-native-gesture-handler
Usage:
import ImageViewer from '@luu-truong/react-native-image-viewer';
function Example() {
const [visible, setVisible] = React.useState(false);
const images = [
{
source: {
uri: 'https://...',
headers: {
'X-Custom-Header': 'foo',
},
width: 1200,
height: 600
},
title: 'blah blah'
},
{
source: require('image.png'),
}
];
return (
<>
<ImageViewer images={images} visible={visible} onClose={() => setVisible(false)} imageProps={{
initialWidth: 200,
initialHeight: 200,
renderFooter: (title?: string) => (<Text>{title}</Text>)
}} />
</>
);
}
Image Viewer Component Props:
Name | Type | Required | Description |
---|---|---|---|
debug | boolean | no | Print debug message. Default: false |
imageProps | object | no | Props passed to Image component. See Image Component Props |
visible | boolean | yes | |
images | Array | yes | |
initialIndex | number | no | Show image index at initialize |
onClose | () => void | yes | Callback when close image viewer |
animationType | string | no |
Image Component Props:
Name | Type | Required | Description |
---|---|---|---|
initialWidth | number | no | Default: 200 |
initialHeight | number | no | Default: 200 |
renderFooter | (title?: string) => JSX.Element | null | no |
debug | boolean | no | Default: false |
If you want to play with the API but don't feel like to trying it on a real device. Clone the repo and go to
demo
folder and run:
yarn install
If you want to try IOS, run pod install
in the ios folder.
Run yarn start
to start metro server.
Run yarn ios
to playing with iOS simulator
Run yarn android
to playing with Android simulator
version | react-native version |
---|---|
1.x.x | 0.64.0+ |
FAQs
Lightweight image viewer for React Native
We found that @luu-truong/react-native-image-viewer 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.