question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bottom navigation with icons: invalid props tintColor

See original GitHub issue

Issue type

I’m submitting a … (check one with “x”)

  • bug report?
  • feature request

Issue description

Current behavior: When I add any icons to bottom tab navigation (e.g. @expo/vector-icons) it shows me Warning: Failed prop type: Invalid props.style key tintColor supplied to Text.

Expected behavior: no warnings.

Steps to reproduce: I’ve basically copy-pasted “With React Navigation API and usage example” from Bottom Navigation documentation and added few icons from @expo/vector-icons to the tabs.

Related code:

import { MaterialIcons } from '@expo/vector-icons';

const WalletIcon = ({ tintColor }) => 
  <MaterialIcons color={tintColor} name="compare-arrows" size={24} />

<BottomNavigationTab title='Accounts' icon={WalletIcon} />

Other information:

OS, device, package version

WIN10, Android Emulator API 29

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13

github_iconTop GitHub Comments

4reactions
deveshrawatcommented, Oct 22, 2019

it still not fixed i am facing the same issue .

2reactions
artyorshcommented, Jul 27, 2019

There are two options for you now:

  • Configure YellowBox to ignore this type of warning
  • Use any other icons library that renders SVG (e.g Eva Icons), or simply use an Image component

Again, the fix will be available in the next release 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native + Icons: Warning: Failed prop type: Invalid props ...
In a basic react-native app with bottom navigation tabs, ... Warning: Failed prop type: Invalid props.style key `tintColor` supplied to ...
Read more >
Alert API - Material UI - MUI
API reference docs for the React Alert component. Learn about the props, CSS, and other APIs of this exported module.
Read more >
Material Top Tabs Navigator | React Navigation
A material-design themed tab bar on the top of the screen that lets you switch between different routes by tapping the tabs or...
Read more >
border-color - CSS: Cascading Style Sheets - MDN Web Docs
When two values are specified, the first color applies to the top and bottom, the second to the left and right.
Read more >
Icons · React Native Paper - Open Source
Some components may not look correct without vector icons and might need extra configuration. Using the icon prop. Many components such as Button...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found