@azzapp/react-native-snapshot-view
v0.1.4
Published
Snapshot view for react-native
Downloads
28
Readme
@azzapp/react-native-snapshot-view
Snapshot view for react-native
Installation
npm install @azzapp/react-native-snapshot-view
Usage
import { captureSnapshot, SnapshotRenderer } from "@azzapp/react-native-snapshot-view";
// capture a snapshot of a view
const snapshotID = await captureSnapshot(viewRef.current);
// Display the captured snapshot
<SnapshotRenderer snapshotID={snapshotID} />
:warning: captured snapshot are kept in memory, either use
releaseSnapshot
to release them, or let theSnapshotRenderer
component release the snapshot on unmount.
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library