react native 5

[react native] 터치 이벤트 컴포넌트

1.TouchableWithoutFeedback https://reactnative.dev/docs/touchablewithoutfeedback TouchableWithoutFeedback · React Native If you're looking for a more extensive and future-proof way to handle touch-based input, check out the Pressable API. reactnative.dev - UI 효과가 없이 터치했을 때 이벤트를 지정해 줄 수 있다. Props onPress : 터치가 시작되어 끝나는 시점에 호출되는 이벤트를 지정해 줄 수 있다. ( === onClick ) onPressIn : 터치가 시작되는 시점에 이벤트를 지정할 수 ..

[react native] 위치정보 가져오기 (expo)

https://docs.expo.dev/versions/latest/sdk/location Location Expo is an open-source platform for making universal native apps for Android, iOS, and the web with JavaScript and React. docs.expo.dev #expo-location 설치 > npx expo install expo-location Method 1. 디바이스 권한요청 (필수) - requestBackgroundPermissionsAsync() : 백그라운드 권한요청 - requestForegroundPermissionsAsync() : 포그라운드 권한요청 - getLastKnownPositionAs..

[react native] 화면 스크롤 하기

https://reactnative.dev/docs/scrollview ScrollView · React Native Component that wraps platform ScrollView while providing integration with touch locking "responder" system. reactnative.dev import {View, ScrollView} from 'react-native'; export default function App() { return ( // 이곳의 컴포넌트들은 scroll 처리 된다. ) } Props - horizontal : 수평 스크롤 모드 (기본 false) - [IOS] indicatorStyle : 스크롤바 스타일 지정 - pagingE..

[react native] 프로젝트 생성 (expo)

실제 react native app을 만들기 위해서는 컴파일을 위한 프로그램이 필요하지만 테스트 / 학습에는 expo를 이용하여 컴파일 과정을 대체할 수 있다. https://expo.dev/ Expo Expo is an open-source platform for making universal native apps for Android, iOS, and the web with JavaScript and React. expo.dev expo 실행을 위해 로그인이 필요하니 가입하도록 한다. # 1.expo-cli 설치 > npm install -g expo-cli # 2.expo app 생성 > npx create-expo-app my-app # 3.expo app login > npx expo login..