본문 바로가기
IT/React

RN(ReactNative) 프로젝트 만들기

by DOSGamer 2022. 8. 8.
반응형

2022.08.08 - [IT/React] - RN(ReactNative) 개발환경 설정

 

RN(ReactNative) 개발환경 설정

개발환경설정 node 16 설치 nvm 으로 설치 하거나 homebrew 로 설치 # nvm 으로 설치 nvm install 16.16.0 nvm use 16.16.0 # homebrew 로 설치 brew install node@16 watchman 설치 brew install watchman JDK 설..

skyksit.tistory.com

 

개발환경을 설정했으니

react-native init 프로젝트 명으로 프로젝트를 생성합니다

2022년 기준으로 reactNative 0.69 버전입니다

# 이전버전 react-native-cli 삭제
npm uninstall --location=global react-native-cli

# react-native 프로젝트 생성
npx react-native init reactNativeTodos

#reactNative 특정 버전 사용시 (0.68)
npx react-native init reactNativeTodos --version 0.68

#TypeScript 사용시
npx react-native init reactNativeTodos --template react-native-template-typescript

설치결과는

#설치 결과
                  Welcome to React Native!
                 Learn once, write anywhere

✔ Downloading template
✔ Copying template
✔ Processing template
✔ Installing CocoaPods dependencies (this may take a few minutes)


  Run instructions for Android:
    • Have an Android emulator running (quickest way to get started), or a device connected.
    • cd "/Users/skyksit/studyspace/reactNativeTodos" && npx react-native run-android

  Run instructions for iOS:
    • cd "/Users/skyksit/studyspace/reactNativeTodos" && npx react-native run-ios
    - or -
    • Open reactNativeTodos/ios/reactNativeTodos.xcworkspace in Xcode or run "xed -b ios"
    • Hit the Run button

  Run instructions for macOS:
    • See https://aka.ms/ReactNativeGuideMacOS for the latest up-to-date instructions.

 

 

반응형