메뉴 건너뛰기

자료실

DATA

2020 03 06 리액트 네이티브 스텍

소프터 2020.03.06 16:23 조회 수 : 7

***** 리액트 처음 시작할래 필수 라이브러리 *****

 

1.스플래시

npm i react-native-splash-screen --save

react-native link react-native-splash-screen

--깔고 링크보고 따라하세요

https://github.com/crazycodeboy/react-native-splash-screen

 

MainActivity 코드참고

package com.kmyhar;

 

++> 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 void onCreate(Bundle savedInstanceState) {

  ++> SplashScreen.show(this);  // here

  ++>  super.onCreate(savedInstanceState);

  ++> }

 

  @Override

  protected String getMainComponentName() {

    return "kmyHar";

  }

}

 

 

[출처] 내앱..

 

2.웹뷰

npm i react-native-webview

react-native link react-native-webview

https://github.com/react-native-community/react-native-webview

 

3.네비게이터 괜찮은거같습니다 사용안해봄

npm install @react-navigation/stack

https://reactnavigation.org/docs/stack-navigator/

 

4.안드로이드 앱간이동 kcp 결제모듈에 사용

npm install react-native-send-intent --save

react-native link react-native-send-intent

https://www.npmjs.com/package/react-native-send-intent

 

5.아이콘 로드

npm i react-native-vector-icons 

react-native link react-native-vector-icons 

https://oblador.github.io/react-native-vector-icons/ 

아이콘 사용하세요