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

235
Views
react: index.js or app.js don't seem to be importing

after some time, i'm creating a react app, and i've just set up a skeleton, but it doesn't show up.

i've done the steps, npx create, npm install and start.

import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import reportWebVitals from './reportWebVitals';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>
);
import React from "react";
import Main from "./components/Main"

const App =()=> {
  return (
    <Main/>
  );
}

export default App;
import React from "react";
import "./Main.scss";

const Main =()=> {
    <div id="main">
        <div className="gameboard">
        </div>
        <div className="console">
        </div>
    </div>
}

export default Main;

using inspector, there are no divs from Main component in the browser. just the root.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Because you don't return the main jsx

import React from "react";
import "./Main.scss";

const Main =()=> {
 return (
  <div id="main">
    <div className="gameboard">
    </div>
    <div className="console">
    </div>
</div>
)
}

export default Main;
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!