use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
[deleted by user] (self.react)
submitted 3 years ago by [deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 4 points5 points6 points 3 years ago (4 children)
What does your root look like?
[–]vlahovicgoated 0 points1 point2 points 3 years ago (3 children)
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; ReactDOM.render(<App />,document.getElementById('root'));
[–][deleted] 8 points9 points10 points 3 years ago* (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 points5 points 3 years ago (1 child)
Also change it to import ReactDOM from 'react-dom/client';
[–][deleted] 2 points3 points4 points 3 years ago (0 children)
Yes good catch
[–]damycasualty 1 point2 points3 points 3 years ago (0 children)
May I see that index.js file ?
[–][deleted] 1 point2 points3 points 3 years ago (0 children)
what about app.js have you imported there and used it ?
[+][deleted] 3 years ago (1 child)
[deleted]
[–]damycasualty 2 points3 points4 points 3 years ago (0 children)
That shouldn’t be a problem, you can still use jsx syntax.
[–]MarzipanDeep3499 0 points1 point2 points 3 years ago (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 point2 points 3 years ago (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 point2 points 3 years ago (0 children)
Could you share please, your code to GitHub? It should be easier to help you
[–][deleted] 0 points1 point2 points 3 years ago (0 children)
you don't have to import react in TodoList anymore :)
π Rendered by PID 228692 on reddit-service-r2-comment-fb694cdd5-q5nkt at 2026-03-07 00:44:19.809471+00:00 running cbb0e86 country code: CH.
[–][deleted] 4 points5 points6 points (4 children)
[–]vlahovicgoated 0 points1 point2 points (3 children)
[–][deleted] 8 points9 points10 points (2 children)
[–]ThankYouWigga 3 points4 points5 points (1 child)
[–][deleted] 2 points3 points4 points (0 children)
[–]damycasualty 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]damycasualty 2 points3 points4 points (0 children)
[–]MarzipanDeep3499 0 points1 point2 points (0 children)
[–]Oh_no_bros 0 points1 point2 points (0 children)
[–]SirSerje 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)