I'm very new to react-native, I've searched a lot about this, but it seems that link
has been removed in react-native V0.69.1.
I don't know how to link custom fonts in my project.
project structure:
android
ios
src
|___assets
|___fonts/all of my fonts with '.ttf'
I've created react-native.config.js
at the root of my project with:
module.exports = {
project: {
ios: {},
android: {},
},
assets: ['./src/assets/fonts/'],
};
and created a <Text style={{fontFamily: 'Splash-Regular',}}>some text</Text>
but no luck!
Run npx react-native-asset
command instead of npx react-native link
. As the link and unlink command is deprecated for the react native version 0.69
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With