Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/gorgeous-carpets-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'react-native-bottom-tabs': patch
---

feat: skip measurements when using custom tab bar
5 changes: 4 additions & 1 deletion packages/react-native-bottom-tabs/src/TabView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@

if (!loaded.includes(focusedKey)) {
// Set the current tab to be loaded if it was not loaded before
setLoaded((loaded) => [...loaded, focusedKey]);

Check warning on line 222 in packages/react-native-bottom-tabs/src/TabView.tsx

View workflow job for this annotation

GitHub Actions / lint

'loaded' is already declared in the upper scope on line 218 column 10
}

const icons = React.useMemo(
Expand Down Expand Up @@ -334,7 +334,10 @@
key={route.key}
freeze={!!freeze}
focused={focused}
style={[styles.screen, measuredDimensions]}
style={[
styles.screen,
renderCustomTabBar ? styles.fullWidth : measuredDimensions,
]}
>
{renderScene({
route,
Expand Down
Loading