import { useEffect , useState } from 'react' ; import { FontSource , loadAsync } from 'expo-font' ; see https example export function useFonts ( map ) { const [ loaded , setLoaded ] = useState ( false ) ; useEffect ( ( ) => { loadAsync ( map ) . then ( ( ) => setLoaded ( true ) ) ; } , [ ] ) ; return [ loaded ] ; } interface FontMap { [ name ] : FontSource ; }