import Share from 'react-native-share' import ViewShot from 'react-native-view-shot' const shotRef = useRef<ViewShot>(null) const getTime = () => { return new Date().getTime().toString() } const OnShare = () => { shotRef.current!.capture().then(uri => { Share.open({ url: uri }) }) } <Button onPress={OnShare}>Share</Button> <ViewShot style={styles.shotWrap} ref={shotRef} options={{ fileName: getTime(), format: 'png', quality: 0.9 }}> //内容可自定义 <Image style={[styles.imgsShera]} resizeMode="cover" source={require('./assets/shera.png')}></Image> </ViewShot>
- react-native native 手机 reactreact-native native手机react react-native native react react-native-vector-icons react-native react-native unavailable fsevents watcher react-native native系统react react react-native片段 代码 react-native解决方案 方案native react-native present native bundle react-native native问题react react-native webview native问题