I imported a custom font exactly as explained in the Expo docs but I’m getting this error message. What am I doing wrong?
TypeError: undefined is not a function (near ‘…_expo.default.loadAsync…’)
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import AuthScreen from './screens/AuthScreen';
import Font from 'expo';
export default class App extends React.Component {
componentDidMount() {
Font.loadAsync({
'GlacialIndifference': require('./assets/fonts/GlacialIndifference-Regular.otf'),
});
}
render() {
return (
<AuthScreen/>
);
}
}