mcnamee / react-native-starter-kit

:rocket: A React Native boilerplate app to get you up and running very, very quickly :rocket:
MIT License
3.35k stars 863 forks source link

Font import #211

Closed happy-machine closed 5 years ago

happy-machine commented 5 years ago

Imported font not being passed to child component

Steps to reproduce

Hi there, first and foremost thanks for this project, really helpful when making the switch to native! I'm following the expo instructions to load fonts using Font.LoadAsync and componentDidMount. I'm trying to load the font within the Recipes Container and then use it in the child Recipes Component. I'm getting the 'is not a system font and hasnt been loaded' error.

Is there somewhere in this framework where i should load fonts so that they are available to all components (and stateless functional components like the Recipes component?)

Thanks

mcnamee commented 5 years ago

Hi @happy-machine Thanks for the feedback :)

This issue looks to be a duplicate of https://github.com/mcnamee/react-native-starter-kit/issues/197 so I'll close and let the conversation continue over there.

Unfortunately the default fonts are appearing for me when I clone and run locally. But here's a link to Expo docs on using custom fonts

Hope it helps!

happy-machine commented 5 years ago

Thanks i left a comment on that issue not clear on the instructions left by the guy who provided a solution?

This is actually about custom fonts though