[React Native] ๋ฒ„ํŠผ์„ ํด๋ฆญํ•˜์—ฌ ํ˜„์žฌ ํ™”๋ฉด์„ ์บก์ฒ˜ํ•ด๋ณด์žโ—
ยท
Frontend/React Native
Install $ yarn add react-native-view-shot Import import ViewShot from 'react-native-view-shot'; Code import ViewShot from 'react-native-view-shot'; function App() { const ref = useRef(); const captureScreen = () => { ref.current.capture().then((uri) => { console.log('capture complete...', uri); }); }; return ( // ํ™”๋ฉด ์บก์ฒ˜๋  ๋ถ€๋ถ„์„ ViewShot ์ปดํฌ๋„ŒํŠธ๋กœ ๊ฐ์‹ธ์ค€๋‹คโ—โ— ํ™”๋ฉด ์บก์ฒ˜ ); } ๐Ÿ’ก useRef useRef๋Š” ํŠน์ • ์ปดํฌ๋„ŒํŠธ๋ฅผ ์„ ํƒํ•  ๋•Œ ์‚ฌ์šฉํ•˜๋Š” ho..
_์„ฑํ˜ธ_
'react native screen capture' ํƒœ๊ทธ์˜ ๊ธ€ ๋ชฉ๋ก