简体   繁体   中英

Icon not showing in react-native

I am using react-native-vector-icons library for showing icons in tabbar like shown below:

import FontAwesome from 'react-native-vector-icons/FontAwesome';

<FontAwesome name='trophy' />

But it's not showing icon, so what to do for this?

在此处输入图像描述

Icon display wrong because it can not find the font. I think you need to check if the bundle contains these.ttf files.

If not, Here is the guide i found from docs

The result of icon i tested with your code:

Code:

Result: 在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM