react-navigation(native-stack) 다운

껌뻑이·2022년 3월 4일
0

ReactNative

목록 보기
2/3
post-thumbnail

react-navigation(native-stack) 다운

install package

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

android

// android/app/src/main/java/com/[project_name]/MainActivity.java

package com.[project_name];

import com.facebook.react.ReactActivity;
import android.os.Bundle; // 추가

public class MainActivity extends ReactActivity {

  /**
   * Returns the name of the main component registered from JavaScript. This is used to schedule
   * rendering of the component.
   */
  @Override
  protected String getMainComponentName() {
    return "[project_name]";
  }
  
  // -- 추가 --
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(null);
  }
  // ---------
}

ios

cd ios
npx pod install

0개의 댓글