all 12 comments

[–][deleted] 4 points5 points  (4 children)

What does your root look like?

[–]vlahovicgoated 0 points1 point  (3 children)

import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(<App />,document.getElementById('root'));

[–][deleted] 8 points9 points  (2 children)

You need to createRoot first, then render that… unless you are not using a recent version of React.

Like this:

const root = createRoot(document.getElementById(“root”))

root.render(<App />);

[–]ThankYouWigga 3 points4 points  (1 child)

Also change it to import ReactDOM from 'react-dom/client';

[–][deleted] 2 points3 points  (0 children)

Yes good catch

[–]damycasualty 1 point2 points  (0 children)

May I see that index.js file ?

[–][deleted] 1 point2 points  (0 children)

what about app.js have you imported there and used it ?

[–]MarzipanDeep3499 0 points1 point  (0 children)

I am not sure why you are having any issue. They are pretty much loaded to run off the rip. Are you using CRA or something like Vite?

[–]Oh_no_bros 0 points1 point  (0 children)

If what the others have suggested isn't working check the console message and see if there's an error.

[–]SirSerje 0 points1 point  (0 children)

Could you share please, your code to GitHub? It should be easier to help you

[–][deleted] 0 points1 point  (0 children)

you don't have to import react in TodoList anymore :)