반응형
navigation시 화면 하단에 있는 탭을 터치해서 탭 간 이동을 할 때 각 탭에 쌓여있는 스택을 비우고 싶다면 Tab.Navigator 선언 시 screenOptions에 unmountOnBlur: true 옵션을 사용하면 된다.
const Tab = createBottomTabNavigator();
<Tab.Navigator
screenOptions={{
unmountOnBlur: true,
}}
>
참고: https://reactnavigation.org/docs/bottom-tab-navigator/#unmountonblur
'ReactNative' 카테고리의 다른 글
[React Native] 실제 기기(아이폰) 연결해서 프로젝트 구동하기 (2) | 2024.07.05 |
---|---|
[React Native] fetch 사용 시 TypeError: Network request failed (0) | 2024.07.01 |
[React Native] 시뮬레이터 기종 지정하기 (0) | 2024.06.11 |
[React Native]error Failed to build iOS project. "xcodebuild" exited with error code '65'. (0) | 2024.05.16 |
react-native-calendars에서 날짜 점프 구현하기 (0) | 2024.04.11 |