-
Notifications
You must be signed in to change notification settings - Fork 83
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Before submitting a new issue
- I tested using the latest version of the library, as the bug might be already fixed.
- I tested using a supported version of react native.
- I checked for possible duplicate issues, with possible answers.
Bug summary
When specifying the tabBarIcon prop with a function, the types are 'any' instead of the proper type.
Library version
0.8.2
Environment info
System:
OS: macOS 15.2
CPU: (8) arm64 Apple M1 Pro
Memory: 156.92 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.18.0
path: ~/.nodenv/versions/18.18.0/bin/node
Yarn:
version: 1.22.1
path: ~/.nodenv/versions/18.18.0/bin/yarn
npm:
version: 9.8.1
path: ~/.nodenv/versions/18.18.0/bin/npm
Watchman:
version: 2024.10.07.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.14.3
path: /Users/andrew.miller/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.1
- iOS 18.1
- macOS 15.1
- tvOS 18.1
- visionOS 2.1
- watchOS 11.1
Android SDK: Not Found
IDEs:
Android Studio: 2024.1 AI-241.19072.14.2412.12360217
Xcode:
version: 16.1/16B40
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.10
path: /usr/bin/javac
Ruby:
version: 2.6.9
path: /Users/andrew.miller/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.76.6
wanted: 0.76.6
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not foundSteps to reproduce
- Create a new project using the @bottom-tabs/expo-template
- Change a screen's tabBarIcon prop in the (tabs)/_layout.tsx file from () to ({ focused })
- A TypeScript error will show the error "Binding element 'focused' implicitly has an 'any' type.ts(7031)"
Reproducible sample code
export default function TabLayout() {
return (
<Tabs>
<Tabs.Screen
name="index"
options={{
title: 'Home',
tabBarIcon: ({ focused }) => ({ sfSymbol: 'house.fill' }),
}}
/>
</Tabs>
);
}Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working