본문 바로가기

React_ReactNative

TypeScript Project 준비

728x90
반응형

 

 

react native cli

npx react-native init RealApp --tamplate react-native-template-typescript@6.12.6

 

ios의 경우

podfile -> hermes_enabled :false 로 변경 후 pod install

Android

android>app>build.gradle 에서 enabledHermes: false

 

xcode 에서 bundle identifier 셋팅 

 

Android도 

android > app > src > java > com > RealApp > MainActivity.java 에서 맨 위

package 를 vscode 전체 찾기 변경(replace)해서  ios 와 동일하게 변경

 

터미널 두개로 확인

한개는 Metro 확인용 yarn run start

다른 한개는 앱 빌드용 yarn run ios yarn run android

 

VSCODE : ESLint와 Prettier - Code formatter 익스텐션 설치

 

Firebase 설치

yarn add @react-native-firebase/app @react-native-firebase/auth @react-native-firebase/firestore

 

Firebase에 각 앱 등록 아래 Setup 확인 후 적용

https://rnfirebase.io/

 

React Native Firebase | React Native Firebase

Welcome to React Native Firebase! To get started, you must first setup a Firebase project and install the "app" module. React Native Firebase is the officially recommended collection of packages that brings React Native support for all Firebase services on

rnfirebase.io

 

Navigation 활용을 위한 셋팅

https://reactnavigation.org/docs/getting-started

 

React Navigation

 

reactnavigation.org

yarn add @react-navigation/native yarn add react-native-screens react-native-safe-area-context

yarn add @react-navigation/native-stack

 

 

-------------------------

기존 자료

 

expo로 typescript 템플릿 생성

npx create-expo-app -t expo-template-blank-typescript

npm install --save @react-navigation/native @react-navigation/native-stack
npm install --save react-native-screens react-native-safe-area-context

 

 

eslint

npm install --save-dev eslint

npx eslint --init

728x90
반응형

'React_ReactNative' 카테고리의 다른 글

React Native 시뮬레이터 reload  (0) 2024.03.15
Windows React Native 환경 셋팅  (0) 2023.11.10
React 성능 개선 하기  (0) 2023.11.10
Study 첫 시작  (0) 2023.06.02