If you want to use Functional Component with hooks, try like this:
add to imports:
import { useState, useEffect } from 'react';
and
const Home = () => {
const [fontLoaded, setFontLoaded] = useState(false);
useEffect(async() => {
await Font.loadAsync({
Pacifico: require('../assets/pacifico/Pacifico.ttf'),
});
setFontLoaded(true);
}, []);
return (
<View style={{ marginTop: 30, alignItems: 'center' }}>
{!fontLoaded ? (
<Text>Loading...</Text>
) : (
<Text style={{ fontSize: 40, fontFamily: 'Pacifico' }}>Book Lover</Text>
)}
</View>
);
};