본문 바로가기
  • Tried. Failed. Logged.
728x90

리액트 네이티브6

Expo - 웹뷰 ERR_CLEARTEXT_NOT_PERMITTED 에러 해결 방법 app.json  "plugins": [ [ "expo-build-properties", { "android": { "usesCleartextTraffic": true } } ] ]"usesCleartextTraffic": true를 추가한다.  출처: https://docs.expo.dev/versions/latest/sdk/build-properties/ BuildPropertiesA config plugin that allows customizing native build properties during prebuild.docs.expo.dev 2023. 8. 15.
리액트 네이티브 - WebView 자바스크립트 조작 & WebView와 앱 메시지 전달 import * as React from 'react'; import { WebView } from 'react-native-webview'; import { StyleSheet } from 'react-native'; import Constants from 'expo-constants'; export default function App() { return ( {console.log(event.nativeEvent.data)}} /> ); } const styles = StyleSheet.create({ container: { flex: 1, marginTop: Constants.statusBarHeight, }, }); 참고: https://docs.expo.dev/versions/latest/sdk.. 2022. 10. 21.
리액트 네이티브 - MapView Marker 사용 예제 import * as React from 'react'; import MapView from 'react-native-maps'; import { StyleSheet, Text, View, Dimensions } from 'react-native'; export default function App() { return ( ); } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#fff', alignItems: 'center', justifyContent: 'center', }, map: { width: Dimensions.get('window').width, height: Dimensions.get('window')... 2022. 10. 14.
리액트 네이티브 - 유용한 사이트 모음 리액트 네이티브 공식 문서 https://reactnative.dev/ React Native · Learn once, write anywhere A framework for building native apps using React reactnative.dev 앱이나 브라우저에서 라이브 실행 지원하는 사이트 https://snack.expo.dev/ Snack - React Native in the browser Write code in Expo's online editor and instantly use it on your phone. snack.expo.dev Expo SDK(카메라, 클립보드, 오디오 관련 라이브러리) https://docs.expo.dev/versions/latest/ API R.. 2022. 10. 10.
리액트 네이티브 - Expo snack에서 패키지 추가 방법 import { Camera } from 'expo-camera'; 이런 식으로 새로운 패키지를 import 하면 프로젝트 페이지 맨 아래에 Add dependency메시지가 나오는데 이걸 누르면 자동으로 추가된다. dependencies에 패키지 명을 추가하는 방식이라, expo-로 시작하는 패키지만 지원이 가능한 것 같음. 출처: https://stackoverflow.com/questions/68931393/how-to-add-add-new-packages-in-expo-snack How to add add new packages in expo snack? I want to use expo-av package in expo snack. However I know that after importing.. 2022. 10. 10.
React Native - 초기 설치 [컴퓨터에 개발 환경 설치하기] https://reactnative.dev/docs/environment-setup Setting up the development environment · React Native This page will help you install and build your first React Native app. reactnative.dev npx react-native init SampleApp cd SampleApp npm run android 출처: https://dev-yakuza.posstree.com/ko/react-native/install-on-windows/ 윈도우(Windows)에 react native 개발 환경 구축하기 react-native로 앱을 개발하기.. 2022. 4. 7.
728x90