I am using Expo and the create-react-native app. I enjoy the live/hot reloading feature on my phone, but I'm wondering about custom fonts.
https://docs.expo.io/versions/v17.0.0/guides/using-custom-fonts.html#loading-the-font-in-your-app
The API for Expo only has directions to load them asynchronously. Do I have to do this on every component I want a custom font on? This seems like it would cause some unnecessary calls when I've already loaded it once.
Is there a way to set the font as global or pass it via props once loaded? It seems like they suggest this approach via their last line in that link:
Note: Typically you will want to load your apps primary fonts before the app is displayed to avoid text flashing in after the font loads. The recommended approach is to move the Font.loadAsync call to your top-level component.
...But they give no explanation on HOW to do that, if that's what they are implying.
So my questions are:
1) Does loading the custom font in multiple times (on each component), cause performance issues? (or maybe it's pulled from cache after the first?)
2) After loading it can you pass the font down via properties or set it as a global?
and finally
3) Is this an Expo only issue? Or a create-react-native app only issue? Or just a livereload/hotloading issue?
Also note, I'm working on Windows/Android