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

116
Views
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 answers
Answer question

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 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!