{"repo":"gre/react-native-view-shot","free":true,"listed":false,"github":"https://github.com/gre/react-native-view-shot","clone":"git clone https://github.com/gre/react-native-view-shot.git","description":"Snapshot a React Native view and save it to an image","language":"TypeScript","stars":2947,"topics":["react-native","snapshot","capture"],"license":"MIT","category":"mobile-apps","readme_excerpt":"react-native-view-shot Capture a React Native view to an image. New Architecture Support This library fully supports React Native's new architecture (Fabric + TurboModules) from version 4.0+. Requirements: - React Native = 0.76.0 - Node.js = 20 Both old and new architectures are supported for seamless migration. Install Since React Native 0.60+, autolink handles the linking automatically. On iOS, install the CocoaPods dependencies: High Level API Props: - children : the actual content to rasterize. - options : the same options as in captureRef method. - captureMode (string): - if not defined (default). the capture is not automatic and you need to use the ref and call capture() yourself. - \"mount\" . Capture the view once at mount. (It is important to understand image loading won't be waited, in such case you want to use \"none\" with viewShotRef.capture() after Image#onLoad .) - \"continuous\" EXPERIMENTAL, this will capture A LOT of images continuously. For very specific use-cases. - \"update\" EXPERIMENTAL, this will capture images each time React redraw (on did update). For very specific use-cases. - onCapture : when a captureMode is defined, this callback will be called with the capture result. - onCaptureFailure : when a captureMode is defined, this callback will be called when a capture fails. captureRef(view, options) lower level imperative API Returns a Promise of the image URI. - view is a reference to a React Native component. - options may include: - fileName (string) : (","default_branch":null,"files":null,"tree":[],"storefront":"/r/gre","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/gre/react-native-view-shot/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}