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.

Theme variable `iconFamily` is not applied correctly

See original GitHub issue

https://github.com/GeekyAnts/NativeBase/blob/ba39355c3be5ba4600dd05bdec0aee5859a863b8/src/basic/IconNB.js#L28 In IconNB component, setIcon() is called in component’s constructor. But at that time, this.context seems to be undefined so the value of iconFamily is not applied except for Ionicons and because of this, icons are not rendered correctly.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

2reactions
boulgomcommented, Mar 26, 2020

Same here. The context is not setup in the constructor

It seems that importing the context in the constructor solves the issue

Thats is to say in IconNB replacing constructor(props) { super(props); this.setIcon(props.type); }

By constructor(props,context) { super(props,context); this.setIcon(props.type); }

maybe it is linked to react version. I’m in 16.12.0 and react native 0.61.5

0reactions
stale[bot]commented, Dec 21, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Next Experience theming variables - ServiceNow Community
Hello, I'm currently working on making new theme for Next Experience UI and I was looking for list of all variables(like:
Read more >
Theming guide - Material Design
The application-wide theme colors that are used as the default across your entire application can be set in Sass. This is as easy...
Read more >
Customize - NativeBase
You can change the variables (for color, fontFamily, iconFamily etc) for a uniform look ... This theme is not 100% material yet but,...
Read more >
jQuery tablesorter 2.0 - Theme Materialize - GitHub Pages
This demo shows how to get around an issue with the filter widget: The zebra widget button below was added to show that...
Read more >
Plugin: macOS theme for Joplin
No icons? If you have the 'Icon family'-setting set to 'macOS native (SF Pro)' you need to have SF Pro installed from the...
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