Не работают все тесты, кроме последнего. Некоторые должны гарантированно работать. Какой-то глюк
import React, { useEffect, useState } from 'react';
import { View, Text, StyleSheet,ActivityIndicator } from 'react-native';
// import { useFonts, loadAsync,font } from 'expo-font';
import * as Font from 'expo-font';
export default function App() {
let customFonts = {
'fonticons': require('./src/assets/fonts/fontIcon/fonticons.ttf'),
'Roboto-Medium': require('./src/assets/fonts/Roboto/Roboto-Medium.ttf'),
'Roboto-Regular': require('./src/assets/fonts/Roboto/Roboto-Regular.ttf'),
'Roboto-Bold': require('./src/assets/fonts/Roboto/Roboto-Bold.ttf'),
}
const [FontStatus, Loadfont] = useState(true)
useEffect(() => {
const loadFontsAsync = async () => {
await Font.loadAsync(customFonts);
// customFonts['Roboto-Bold'],customFonts['Roboto-Medium'],customFonts['Roboto-Regular']
Loadfont(false)
}
loadFontsAsync()}, [])
return (
<View styles={styles.container}>
{FontStatus && <ActivityIndicator size="small" color="#0000ff" />}
<Text>Open up App.js to start working on your app!</Text>
</View>
);
}
const styles = StyleSheet.create({
container: {
}
})