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.

Only some Icon names will work - partial success.

See original GitHub issue

react-native, react and native-base version

"react-native": "0.52.2",
"native-base": "2.3.9",
"react-native-vector-icons": "4.5.0",

Steps to reproduce (code snippet or screenshot)

import {Icon} from 'native-base';
<Icon name='md-pin' />
<Icon name='graduation-cap' />

Expected behaviour

See a pin icon, followed by graduation-cap icon

Actual behaviour

See a pin icon, but no graduatin-cap icon, and also get a warning stating “Invalid prop ‘name’ of value ‘graduation-cap’”

Screenshot of emulator/device

https://drive.google.com/open?id=156F6CQAy8y0F9O7CyZqWJxwLamBRCLrB https://drive.google.com/open?id=1iabWOC-fPdea09a2zP--mKLtLk7RTMyh

Is the bug present in both ios and android or in any one of them?

BOTH

Any other additional info which would help us debug the issue quicker.

This worked for quite a while. I originally used the react-native link react-native-vector-icons command to get it working. Today it stopped working, and I have no idea why. I changed nothing. returning to the exact commit where it was known to work doesn’t help. I feel like there must be some cache outside of the project directory that has bad references or something.

I’ve already tried:

	<key>UIAppFonts</key>
	<array>
		<string>Entypo.ttf</string>
		<string>EvilIcons.ttf</string>
		<string>Feather.ttf</string>
		<string>FontAwesome.ttf</string>
		<string>Foundation.ttf</string>
		<string>Ionicons.ttf</string>
		<string>MaterialCommunityIcons.ttf</string>
		<string>MaterialIcons.ttf</string>
		<string>Octicons.ttf</string>
		<string>SimpleLineIcons.ttf</string>
		<string>Zocial.ttf</string>
	</array>
  • changing versions of nativebase and as well as the vector icon libraruy
  • restarting the simulator and React Native Metro Bundler at every step
  • Installed and inspected the font files to confirm the icon is in fact IN there

I’ve got about 5 hours straight into trying to solve this, following all community threads and issues I could find, and following all “auto link” and “manual” solutions. I am successfully pulling in SOMETHING because some icons show up, but some others are not.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
pablozandonacommented, Nov 6, 2018

Same issue here.

I cloned the project NativeBase-KitchenSink, and tested in sidebar items (but this occurs on any screen).

When put the tag active the icons works fine:

<Icon active name={data.icon} style={{ color: "#777", fontSize: 26, width: 30 }} />

captura de tela 2018-11-06 as 13 13 39

But when remove the tag (default mode), this stop of working:

<Icon name={data.icon} style={{ color: "#777", fontSize: 26, width: 30 }} />

captura de tela 2018-11-06 as 13 13 11

2reactions
akhil-gacommented, Mar 21, 2018

@lancedolan <Icon/> take Ionicons as the icon family if no type is specified. You can use any one of these icon families

Entypo,
EvilIcons, 
Feather, 
FontAwesome, 
Foundation, 
Ionicons, 
MaterialCommunityIcons, 
MaterialIcons, 
Octicons, 
SimpleLineIcons, 
Zocial 

Attaching a gif

icons

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to indicate partial success in an Android notification?
So if you are doing it right, you show the colored icons in the Notification's panel itself (small or large icon).
Read more >
position of vault names — 1Password Support Community
I don't want to roll up/down the list of category names just to get at the ... That was a partial success -...
Read more >
Vallox ValloPlus 350MV partial success -> Work in progress ...
Hi, I own a VALLOX 350 MV and I generally started to build up my little “Smart Home” with Home Assistant. I used...
Read more >
Understanding Success Criterion 1.4.11: Non-text Contrast | WAI
Low contrast controls are more difficult to perceive, ... The Use of Color success criterion addresses changing only the color (hue) of an...
Read more >
7 Quick Ways to Fix Desktop Icons not Showing on Windows 10
If your Windows 10 desktop icons are not showing, make sure to reset Explorer.exe, disable Tablet mode, or alternatively, go for the system ......
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