Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

154
Views
React native custom fonts not loading in, not sure why?

I did everything like in the documentation, but my Custom Fonts do not want to load in. I could wait for hours and nothing happens...

This is my App.js:

import React, { useState } from 'react';
import AuthNavigation from './AuthNavigation';
import useFonts from './shared/useFonts';
import LoadingScreen from './screens/LoadingScreen';

export default function App() {
  const [isReady,setIsReady] = useState(false);

  const LoadFonts = async () => {
    await useFonts();
    setIsReady(true);
  }

  useEffect(() => {
    LoadFonts();
      },[])

  if (!isReady) {
    return(
      <LoadingScreen/>
    )
  }
  else{
  return (
    <AuthNavigation/>
  );
  }
}

And this is my useFont.js

import Font from 'expo-font';

export default useFont = async () => 
    await Font.loadAsync({
       QuicksandMedium: require('../assets/Fonts/Quicksand-Medium.ttf'),
       AmaticSCRegular: require('../assets/Fonts/AmaticSC-Regular.ttf')
    })

There is no error printed in the console, so I have no clue what I am doing wrong :/

enter image description here

enter image description here

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

I'm not sure, but maybe that if should be the problem. Try with this:

import React, { useState } from 'react';
import AuthNavigation from './AuthNavigation';
import useFonts from './shared/useFonts';
import LoadingScreen from './screens/LoadingScreen';

export default function App() {
  const [isReady,setIsReady] = useState(false);

  const LoadFonts = async () => {
    await useFonts();
    setIsReady(true);
  };

  useEffect(() => {
    LoadFonts();
  },[]);

  return (
    <>
      {isReady ?
        <AuthNavigation/>
        :
        <LoadingScreen/>
      }
    </>
  );
}
about 4 years ago · Juan Pablo Isaza Report

0

Solution is to import your Fonts like this:

import * as Font from 'expo-font';

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!