Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Calculadora

0

37
Vistas
Element type Invalid React Native

I just created a project and I m getting this error. No dependencies installed yet

import { StatusBar } from "expo-status-bar";
import {
  StyleSheet,
  Text,
  View,
  Container,
  Header,
  Title,
  Button,
  Left,
  Right,
  Body,
  Icon,
} from "react-native";

export default function App() {
  return (
    <Container>
      <Header>
        <Body>
          <Title></Title>
        </Body>
      </Header>
    </Container>
  );
}

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of `App`.

This error is located at: in RCTView (created by View) in View (created by App) in App (created by ExpoRoot) in ExpoRoot in RCTView (created by View) in View (created by AppContainer) in RCTView (created by View) in View (created by AppContainer) in AppContainer

7 months ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Did you create project using expo or react-native-cli and have you changed anything after creating the project?

If this is the expo cli you can try closing the metrol bundler and running npm install in your terminal then starting it again.

If this is react-native-cli you can try running.

npm install
cd ios && pod install
cd ..
7 months ago · Juan Pablo Isaza Denunciar

0

try running this commands

 cd android
./gradlew clean
npm install
7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar empleo Planes Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2023 PeakU Inc. All Rights Reserved.