Skip to content

AzzappApp/react-native-snapshot-view

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

@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} />

⚠️ captured snapshot are kept in memory, either use releaseSnapshot to release them, or let the SnapshotRenderer component release the snapshot on unmount.

Contributing

License

MIT


Made with create-react-native-library