Where do I find the document.getElementById('app') that I am rendering onto?
In the case of this lesson, you can find that clicking onto the folder icon at the top left of the middle panel will display multiple files, clicking on them opens them. If we open
index.html we can see that the main tag has the id of
... <body> <main id="app"> </main> <script src="https://s3.amazonaws.com/codecademy-content/courses/React/react-course-bundle.min.js"></script> <script src="/ProfilePage.compiled.js"></script> </body> ...
In our local projects using
create-react-app we will notice that thereis a
public/ directory that contains
index.html there will commonly be the
<body> tag with an id of
root which is what
React.render() will use for our react components.