![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
react-native-simple-image-viewer
Advanced tools
한국어 | English
single image
multiple images
npm install react-native-modal react-native-reanimated react-native-gesture-handler react-native-simple-image-viewer
yarn add react-native-modal react-native-reanimated react-native-gesture-handler react-native-simple-image-viewer
| Setting for react-native-reanimated
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
...
['react-native-reanimated/plugin'] //<- add, end of array
],
}
project.ext.react = [
enableHermes: true // <- false to true
]
import com.facebook.react.bridge.JSIModulePackage; // <- add
import com.swmansion.reanimated.ReanimatedJSIModulePackage; // <- add
...
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
...
@Override
protected String getJSMainModuleName() {
return "index";
}
@Override // <- add
protected JSIModulePackage getJSIModulePackage() { // <- add
return new ReanimatedJSIModulePackage(); // <- add
} // <- add
};
...
X:\your-project-name\android\gradlew clean
X:\your-project-name\npx react-native run-android
...
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => true # <- false to true
)
# this is option
# use_flipper!()
...
c:\your-project-name\ios\pod cache clean --all
c:\your-project-name\ios\pod deintegrate
c:\your-project-name\ios\pod install
c:\your-project-name\npm react-native run-ios
AndroidManifest.xml
<application
android:name=".MainApplication"
...
android:largeHeap="true" <-- add
...>
proguard-rules.pro
# Add project specific ProGuard rules here.
...
# react-native-reanimated
-keep class com.swmansion.reanimated.** { *; }
-keep class com.facebook.react.turbomodule.** { *; }
# react-native-fast-image
-keep public class com.dylanvann.fastimage.* {*;}
-keep public class com.dylanvann.fastimage.** {*;}
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public class * extends com.bumptech.glide.module.AppGlideModule
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
**[] $VALUES;
public *;
}
import { SimpleImageViewer } from "react-native-simple-image-viewer";
//...
const [isVisible, setIsVisible] = useState<boolean>(false);
return (
<View style={{flex:1}}>
<Button
title={'show'}
style={{width: '100%', height: 80}}
onPress={()=>setIsVisible(prevState => !prevState)} />
<SimpleImageViewer
imageUri={{ uri: 'https://via.placeholder.com/2048/18A6F6' }}
isVisible={isVisible}
/>
</View>
);
<SimpleImageViewer
perPage={itemsPerPage}
imageUri={defaultImage}
images={defaultImages}
isVisible={showHide}
onClose={() => setShowHide(false)}
bgColor={'#333333'}
/>
Name | Parameter Type | Required | Default | Description |
---|---|---|---|---|
isVisible | Boolean | O | false | show / hide modal |
imageUri | Object : { uri : string , title? : string } | O | https://via.placeholder.com/2048/18A6F6 | jsonPlaceHolder image url |
images? | Array | X | [ ] | Array of imageUri |
bgColor? | String | X | #333333 | |
onClose? | Function : (state:boolean) => void | X | false | return false when turn off |
viewMode | 'single','multi' | X | 'single' | |
perPage | number | X | 3 | |
naviPosition | 'top', 'bottom' | X | - | working in progress |
leftHanded | boolean | X | false | close-button position change |
selectedIndex | number | X | 0 | Selected array of imageUri object's index |
showTitle | boolean | X | false | Show/Hide Selected imageUri object's title |
itemMargin | number | X | 15 | margin between items of list |
showPage | boolean | X | false | Show/Hide page current and total page number |
token | string | X | - | string token like jwt |
tokenHeader | string | X | 'Bearer' | string token header like jwt header |
requestMethod | string | X | 'GET' |
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
FAQs
image viewer modal component for react-native
We found that react-native-simple-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.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.