Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

168
Views
React Native - Advertencia: React.createElement: el tipo no es válido: se esperaba una cadena (para componentes integrados) o una clase/función

Estoy aprendiendo a reaccionar de forma nativa y estaba importando una carga de aplicaciones para usar fuentes personalizadas. Obtuve este error:

Advertencia: React.createElement: el tipo no es válido: esperaba una cadena (para componentes integrados) o una clase/función (para componentes compuestos) pero obtuvo: indefinido. Probablemente olvidó exportar su componente desde el archivo en el que está definido, o puede haber mezclado las importaciones predeterminadas y con nombre.

mi aplicación.js

 import React, { useState } from 'react'; import * as Font from 'expo-font'; import Home from './screens/Home'; import { AppLoading } from 'expo-app-loading'; const getFonts = () => Font.loadAsync({ 'nunito-regular': require('./assets/Fonts/Nunito-Regular.ttf'), 'nunito-bold': require('./assets/Fonts/Nunito-Bold.ttf'), }); export default function App() { const [fontsLoaded, setFontsLoaded] = useState(false); if (fontsLoaded) { return <Home />; } else { return <AppLoading startAsync={getFonts} onFinish={() => setFontsLoaded} />; } }

mi Inicio.js

 import React from 'react'; import { StyleSheet, View, Text } from 'react-native'; export default function Home() { return ( <View style={styles.container}> <Text style={styles.titleText}>Home Screen</Text> </View> ); } const styles = StyleSheet.create({ container: { padding: 24, }, titleText: { fontFamily: 'nunito-bold', fontSize: 18, }, });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

o es posible que haya mezclado importaciones predeterminadas y nombradas.

Este es el problema.

Importas esto:

 import { AppLoading } from "expo-app-loading";

Los documentos dicen que importe esto:

 import AppLoading from 'expo-app-loading';
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!