Me too, same stetps and same error. Did you solve it Emma? thanks
Im using this method with Expo react native: first install the relative npm packages, in my case im using "tajawal" font
npm i @expo-google-fonts/tajawal
in App.js:
let [fontsLoaded] = useFonts({ Tajawal_300Light, Tajawal_400Regular, Tajawal_500Medium, Tajawal_800ExtraBold, }); if (!fontsLoaded) { return <AppLoading />; }
Then
const TajawalFontFamily = StyleSheet.create({ ExtraBold: { fontFamily: "Tajawal_800ExtraBold", }, Light: { fontFamily: "Tajawal_300Light", }, Regular: { fontFamily: "Tajawal_400Regular", }, Medium: { fontFamily: "Tajawal_500Medium", }, });
then i pass (TajawalFontFamily ) as prop to my component
<Home font:{TajawalFontFamily }
in Home component:
<Text style={[styles.headerText, font.ExtraBold]}>الباحث في الحديث</Text>
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Me too, same stetps and same error. Did you solve it Emma?
thanks
Im using this method with Expo react native:
first install the relative npm packages, in my case im using "tajawal" font
in App.js:
Then
then i pass (TajawalFontFamily ) as prop to my component
in Home component: