NHT NHT - 1 year ago 142
Javascript Question

Can't load Icon in React native

I'm a beginner in React native
I used http://nativebase.io/ for my example
but I have a problem with the Icon.
My App does not show the Icon

  • My App:

enter image description here

  • Code:

* Sample React Native App
* https://github.com/facebook/react-native
* @flow

import React, { Component } from 'react';
import { AppRegistry } from 'react-native';
import { Container,Header,Content,Title,Badge,Tabs,Button,Icon} from 'native-base';
import Com_DetailCook from './component/Com_DetailCook';

class CookApp extends Component {
render() {
return (
<Button transparent>
<Icon name='ios-arrow-back' />


<Button transparent>
<Icon name='ios-menu' />



AppRegistry.registerComponent('CookApp', () => CookApp);

  • And config Icon for Guide (github.com/oblador/react-native-vector-icons)

Thanks for any help!

Answer Source

From what I've read on the issues of the react-native-vector-icons library. You need to install it manually sometimes the linking it's not working.

Take a look at this issues

For a guide to install it look at the docs here https://github.com/oblador/react-native-vector-icons#option-manually

Hope that help ;)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download