import ViewShot,{ captureScreen,captureRef } from "react-native-view-shot"; // import { captureScreen,captureRef } from "react-native-view-shot"; class ExampleCaptureOnMountManually extends Component { componentDidMount () { this.refs.viewShot.capture().then(uri => { console.log("do something with ", uri); }); } render() { return ( ...Something to rasterize... ); } } export {ExampleCaptureOnMountManually}