Skip to content

Repository files navigation

This is a new React Native project, bootstrapped using @react-native-community/cli.

Getting Started

Note: Make sure you have completed the Set Up Your Environment guide before proceeding.

Step 1: Start Metro

First, you will need to run Metro, the JavaScript build tool for React Native.

To start the Metro dev server, run the following command from the root of your React Native project:

# Using npm
npm start

# OR using Yarn
yarn start

Step 2: Build and run your app

With Metro running, open a new terminal window/pane from the root of your React Native project, and use one of the following commands to build and run your Android or iOS app:

Android

# Using npm
npm run android

# OR using Yarn
yarn android

iOS

For iOS, remember to install CocoaPods dependencies (this only needs to be run on first clone or after updating native deps).

The first time you create a new project, run the Ruby bundler to install CocoaPods itself:

bundle install

Then, and every time you update your native dependencies, run:

bundle exec pod install

For more information, please visit CocoaPods Getting Started guide.

# Using npm
npm run ios

# OR using Yarn
yarn ios

If everything is set up correctly, you should see your new app running in the Android Emulator, iOS Simulator, or your connected device.

This is one way to run your app — you can also build it directly from Android Studio or Xcode.

Step 3: Modify your app

Now that you have successfully run the app, let's make changes!

Open App.tsx in your text editor of choice and make some changes. When you save, your app will automatically update and reflect these changes — this is powered by Fast Refresh.

When you want to forcefully reload, for example to reset the state of your app, you can perform a full reload:

  • Android: Press the R key twice or select "Reload" from the Dev Menu, accessed via Ctrl + M (Windows/Linux) or Cmd ⌘ + M (macOS).
  • iOS: Press R in iOS Simulator.

Congratulations! 🎉

You've successfully run and modified your React Native App. 🥳

Now what?

  • If you want to add this new React Native code to an existing application, check out the Integration guide.
  • If you're curious to learn more about React Native, check out the docs.

Troubleshooting

If you're having issues getting the above steps to work, see the Troubleshooting page.

Learn More

To learn more about React Native, take a look at the following resources:

RN에서 주로 사용하는 화면 전환

  1. React Navigation 설치 먼저 React Navigation을 설치해줍니다.
  • npm install @react-navigation/native
  • npm install @react-navigation/stack
  • npm install react-native-screens react-native-safe-area-context 그리고 React Native Gesture Handler와 React Native Reanimated도 설치해야 합니다.
  • npm install react-native-gesture-handler react-native-reanimated 설치가 완료된 후, react-native-gesture-handlerreact-native-reanimated를 앱의 index.js나 App.js에서 연결해줍니다. (이 프로젝트에서는 App.tsx)
  • import 'react-native-gesture-handler'; // 반드시 맨 위에 import 해줘야 함!

react-native-worklets 설치

에러 메시지가 뜬다면 react-native-worklets가 누락되었다고 명시하고 있기 때문에, 해당 패키지를 npm 또는 yarn을 이용해 설치해줘야 합니다.

  • npm install react-native-worklets

react-native-vector-icons 설치

  • npm install react-native-vector-icons

Feather 아이콘을 사용하려면 @react-native-vector-icons/feather 패키지를 추가로 설치해야 합니다.

  • npm install @react-native-vector-icons/feather

이 패키지는 react-navigation-stack보다 더 최신 버전의 스택 네비게이션입니다.

설치 명령어는 다음과 같습니다

  • npm install @react-navigation/native-stack

react-native-linear-gradient 설치

react-native-linear-gradient 모듈이 설치되지 않았거나, 누락된 경우 설치해야 합니다. 아래 명령어로 모듈을 설치하세요.

  • npm install react-native-linear-gradient

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages