NHT NHT - 1 month ago 7
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 (
<Container>
<Header>
<Button transparent>
<Icon name='ios-arrow-back' />
</Button>

<Title>CookApp</Title>

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

<Content>
<Com_DetailCook/>
</Content>

</Container>
);
}
}


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






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



Thanks for any help!

Answer

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 ;)

Comments