모바일/ReactNative
[RN] requireNativeComponent: "RNCViewPage" was not found in the UIManager 오류 해결
hatch
2023. 7. 24. 22:19
728x90
반응형
문제
진행 중인 프로젝트의 화면을 구성하던 중 상단 탭이 필요하여
React-Navigation의 createMaterialTopTabNavigator을 적용하고자 하였음.
<Tab.Navigator>
<Tab.Screen>
</Tab.Screen>
</Tab.Navigator>
구조로 잘 작성했음에도 불구하고
"RNCViewPage" was not found in the UIManager 오류가 뜨며 화면에 안 보임.
해결
생각보다 답은 매우 가까이에 있었다.
npm 설치할 때 전부 했어야 했는데 공식문서를 제대로 안 읽은 탓에 1가지만 설치했음.
1. npm install @react-navigation/material-top-tabs react-native-tab-view
2. npm install react-native-pager-view
[공식문서] https://reactnavigation.org/docs/material-top-tab-navigator/#example
혼자 해결해보겠다고 끙끙대다 구글링하고 바로 답을 찾았다.
공식문서를.. 제대로.. 잘 읽읍시다^^.