Recibo la siguiente advertencia:
" Sobrescritura del preprocesador de atributo de estilo familiar de fuente " que sale StyleSheet.js
cuando se ejecuta la aplicación en el simulador de iOS. Sin embargo, aún no he probado en Android.
Aplicación.tsx
import { StatusBar } from 'expo-status-bar';
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default function App() {
return (
<View style={styles.container}>
<Text>Open up App.js to start working on your app!</Text>
<StatusBar style="auto" />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
Solución del problema
Esto viene directamente de la exposición si lo ha expo-font
instalado.
Esta es la línea de código node_modules/expo/build/Expo.fx.js
que conduce a esa advertencia:
// If expo-font is installed and the style preprocessor is available, use it to parse fonts.
if (StyleSheet.setStyleAttributePreprocessor) {
StyleSheet.setStyleAttributePreprocessor('fontFamily', Font.processFontFamily);
La línea de node_modules/react-native/Libraries/StyleSheet/StyleSheet.js
eso plantea la advertencia:
if (__DEV__ && typeof value.process === 'function') {
console.warn(`Overwriting ${property} style attribute preprocessor`);
}
Parece que lo mejor que puede hacer sería ocultar la advertencia por ahora agregando las siguientes líneas en la parte superior de su App.js
o index.js
:
import { LogBox } from 'react-native';
LogBox.ignoreLogs([
"Overwriting fontFamily style attribute preprocessor"
]);
No hay comentarios.:
Publicar un comentario