Skip to content

Commit 3e9fd61

Browse files
authored
fix: update render logic in TabScreen to conditionally render for iOS (#3691)
1 parent 5d4dbff commit 3e9fd61

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/mobile/src/lib/navigation/bottom-tab/TabScreen.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { FC, PropsWithChildren } from "react"
33
import { use, useEffect, useMemo } from "react"
44
import { StyleSheet } from "react-native"
55

6+
import { isIOS } from "../../platform"
67
import { WrappedScreenItem } from "../WrappedScreenItem"
78
import { BottomTabContext } from "./BottomTabContext"
89
import { TabScreenWrapper } from "./native"
@@ -92,7 +93,7 @@ export const TabScreen: FC<PropsWithChildren<Omit<TabScreenProps, "tabScreenInde
9293
)
9394
const shouldLoadReact = mergedProps.lazy ? isSelected || isLoadedBefore : true
9495

95-
const render = __DEV__ ? isSelected : true
96+
const render = !__DEV__ && isIOS ? true : isSelected
9697
return (
9798
<TabScreenWrapper style={StyleSheet.absoluteFill}>
9899
<TabScreenContext value={ctxValue}>

0 commit comments

Comments
 (0)