I’m trying to use custom font, but it never finishes loading. I’ve consulted all the previous solutions.
My main component is
import React from 'react';
import * as Font from 'expo-font';
export default class extends React.Component {
state = { fontLoaded: false }
async componentDidMount() {
await Font.loadAsync({
'Merriweather': './assets/fonts/Merriweather-bold.ttf'
});
this.setState({ fontLoaded: true });
}
render() {
const { fontLoaded } = this.state;
return fontLoaded ? <AppContainer/> : null;
}
}