
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
react-native-microscope
Advanced tools
$ yarn add react-native-microscope
$ yarn add react-native-view-shot
iOS:
$ react-native link react-native-microscope
Libraries
➜ Add Files to [your project's name]
node_modules
➜ react-native-microscope
and add RNMicroscope.xcodeproj
libRNMicroscope.a
to your project's Build Phases
➜ Link Binary With Libraries
Cmd+R
)<android/app/src/main/java/[...]/MainActivity.java
import com.reactlibrary.RNMicroscopePackage;
to the imports at the top of the filenew RNMicroscopePackage()
to the list returned by the getPackages()
methodandroid/settings.gradle
:
include ':react-native-microscope'
project(':react-native-microscope').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-microscope/android')
android/app/build.gradle
:
compile project(':react-native-microscope')
import RNMicroscopeView from "react-native-microscope";
return (
<>
<StatusBar barStyle="dark-content" />
<View style={{ flex: 1 }}>
<RNMicroscopeView
style={{ flex: 1, width: "100%", height: "100%" }}
onStartCapture={() => console.log("start")}
onCaptureSuccess={uri => alert(uri)}
onCaptureError={e => console.log(e)}
/>
</View>
</>
);
import RNMicroscopeView from "react-native-microscope";
return (
<>
<StatusBar barStyle="dark-content" />
<View style={{ flex: 1 }}>
<RNMicroscopeView
ref={"microscope"}
styleMicroscope={styles.microscope}
buttonCaptureComponent={
<TouchableOpacity onPress={() => this.refs.microscope._onCapture()}>
<Text>Button custom</Text>
</TouchableOpacity>
}
onStartCapture={() => console.log("start")}
onCaptureSuccess={uri => alert(uri)}
onCaptureError={e => console.log(e)}
/>
</View>
</>
);
onStartCapture
(Function) - return callback when start captureonCaptureSuccess
(Function) - return base64 or urionCaptureError
(Function) - return error capturestyle
(Object) - style containerstyleMicroscope
(Object) - style camera viewbuttonCaptureComponent
(Component) - custom button capture (using this.refs.microscope._onCapture())optionFormat
(Object) - option format image, default is { format: "png", quality: 0.9 }
FAQs
## Getting started
The npm package react-native-microscope receives a total of 990 weekly downloads. As such, react-native-microscope popularity was classified as not popular.
We found that react-native-microscope 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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.