fix: update render logic in TabScreen to conditionally render for iOS (#3691)

This commit is contained in:
Whitewater 2025-05-09 18:29:59 +09:00 committed by GitHub
parent 5d4dbff9fc
commit 3e9fd61575
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ import type { FC, PropsWithChildren } from "react"
import { use, useEffect, useMemo } from "react"
import { StyleSheet } from "react-native"
import { isIOS } from "../../platform"
import { WrappedScreenItem } from "../WrappedScreenItem"
import { BottomTabContext } from "./BottomTabContext"
import { TabScreenWrapper } from "./native"
@ -92,7 +93,7 @@ export const TabScreen: FC<PropsWithChildren<Omit<TabScreenProps, "tabScreenInde
)
const shouldLoadReact = mergedProps.lazy ? isSelected || isLoadedBefore : true
const render = __DEV__ ? isSelected : true
const render = !__DEV__ && isIOS ? true : isSelected
return (
<TabScreenWrapper style={StyleSheet.absoluteFill}>
<TabScreenContext value={ctxValue}>