🖊️ Let's add custom fonts to a React Native App!

🖊️ Let's add custom fonts to a React Native App!

It's fairy simple... :)

STEP 1:

Create a new file in your RN project's root dir with name react-native.config.js and content:

module.exports = {
project: {
    ios: {},
    android: {},
},
assets: ['./assets/fonts']
};

STEP 2:

Now, if you're exporting for Android, go to: $PROJECT_ROOT/android/app/src/main/assets/fonts and paste your fonts.

STEP 3:

Go back to your project's root dir and execute this command in the terminal:
react-native link

STEP 4:

Run the app with:
react-native run-android