728x90

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

 

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

 

 

 

1. NavigationContainer 로 감싸기

2. createNativeStackNavigator

3. Stack.Navigator + name +  component

4.Stack.Navigator + initialRouteName + Stack.Screen

5. options={{ title: '타이틀이름' }}

6. 이동 : {navigation} + onPress={() => navigation.navigate('name')}

728x90
728x90

C:\Users\<사용자명>\AppData\Local\Android\Sdk/emulator/emulator @<AVD 명>

728x90
728x90

코드가 사용되지 않으면 빨간줄 쳐져 있는게 보기 싫어서 no-unused-vars 를 rules에 추가해 줬다.

 

module.exports = {
  root: true,
  extends: '@react-native-community',
  rules: {
    'no-unused-vars': 'off',
    '@typescript-eslint/no-unused-vars': ['off'],
  },
};
728x90

'study > 프론트엔드' 카테고리의 다른 글

[Frontend] Webpack + typescript  (0) 2024.04.17
[CSS] 텍스트 ... 처리  (0) 2022.09.07
호이스팅  (0) 2022.07.22

+ Recent posts