Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMichael Vanderloon
610 PointsReactDom is not defined. My elements aren't rendering because when i load the page it says react dom is not defined.
I am using live-server to use serve the file using vs code as my editor.
1 Answer
Eyanjem Etta-Ashu
Full Stack JavaScript Techdegree Graduate 18,260 PointsIf you are using a life server you can also install ReactDom as a dependency in your react app folder.
Bader Alsabah
4,738 PointsBader Alsabah
4,738 PointsHi Michael,
I'm not sure exactly on your question - but if ReactDom is undefined - then this means your browser doesn't have access to React Library and therefore any React calls will be undefined.
I suggest making sure that when you load your index.html it includes the following CDN script calls
Just make sure to replace app.js with the name of your JS/React code file if you have chosen a different name. These will make the React libraries available to you when running your React components.
Hope this helps!