diff --git a/.changeset/all-dryers-study.md b/.changeset/all-dryers-study.md new file mode 100644 index 0000000..027aa62 --- /dev/null +++ b/.changeset/all-dryers-study.md @@ -0,0 +1,5 @@ +--- +'react-native-bottom-tabs': patch +--- + +fix: set initial size to full screen diff --git a/packages/react-native-bottom-tabs/src/TabView.tsx b/packages/react-native-bottom-tabs/src/TabView.tsx index 3e490f6..dd71356 100644 --- a/packages/react-native-bottom-tabs/src/TabView.tsx +++ b/packages/react-native-bottom-tabs/src/TabView.tsx @@ -7,6 +7,7 @@ import type { } from './TabViewNativeComponent'; import { type ColorValue, + type DimensionValue, Image, Platform, StyleSheet, @@ -198,8 +199,8 @@ const TabView = ({ const customTabBarWrapperRef = useRef(null); const [tabBarHeight, setTabBarHeight] = React.useState(0); const [measuredDimensions, setMeasuredDimensions] = React.useState< - { width: number; height: number } | undefined - >(); + { width: DimensionValue; height: DimensionValue } | undefined + >({ width: '100%', height: '100%' }); const trimmedRoutes = React.useMemo(() => { if (