Include Example
rturk opened this issue · 5 comments
rturk commented
- IOS example
- Android Example
speller commented
Don't understand how to use it. When I try this:
import FontAwesome from 'react-native-fontawesome';
...
render() {
return (
<View style={styles.container}>
<TouchableHighlight style={ styles.imageContainer }>
<FontAwesome>
yahoo
</FontAwesome>
</TouchableHighlight>
</View>
);
};
I get the error: Touchable child must either be native or forward setNativeProps to a native component
What to do?
speller commented
@sibelius The patch is incomplete. It work only if I change the first file of the file to import React, { Component } from 'react';
. This solved the error messages, but I still can't see any icons, just a blank page. How to change my example above to see icons? I added the fontawesome-webfont.ttf
to the assets/fonts dir.
sibelius commented
speller commented
@sibelius The font filename was the issue, thanks!
I'm totally newbie in mobile development and React Native so I just learn everything.
So I suggest following addition to the README:
- Code examples in two notations for newbies such as me (first code notation as in my code example and second in more classic way (I'm sorry, I don't know how to call them in right way))
- Any another exaples if possible.
- Where to put the font files and under what names.