Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

118
Vistas
why I cant see any output on my reactjs app?

I have started my first React lesson but I cant see any output on my localhost(3000), will you pls help me ?

this is my JS code :

import React from 'react';
import ReactDOM from 'react';

const element = React.createElement("div", { id: "title", className: "app-title" }, "this is a test text");

ReactDOM.render(element, document.getElementById("root"));
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Look at the Console in your browser's developer tools. When I run this code it says:

Uncaught TypeError: _reactDefault.default.render is not a function

So something is wrong with the object you call render on. That clues us into looking at the place it is defined.

import React from 'react';
import ReactDOM from 'react';

You've imported react twice and assigned it to different variables. That doesn't make a whole lot of sense.

So go back and check the tutorial you are working from.

You should see that ReactDOM should be imported from 'react-dom' and not 'react'.

import React from 'react';
import ReactDOM from 'react-dom';
about 4 years 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 vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda