React Native Expo.Font.loadAsync doesn't load Material Icons
After hours wracking my brain on this, the answer was there in front of me the whole time.
Presumably, React Native Elements refers to Material icons as Material Icons
, not MaterialIcons
.
This means that the default import from @expo/vector-icons
does not work as their reference to Material icons is different.
The solution is to manually select Material icons from expo, replacing this line;
await Font.loadAsync(MaterialIcons.font)
with
await Font.loadAsync({
'Material Icons': require('@expo/vector-icons/fonts/MaterialIcons.ttf')
})
I hope this saves someone some time in the future.