Hey everyone
In the React section of the Front End Development Libraries course, the first lesson / challenge, “Create a Simple JSX Element”, contains the following paragraph:
It’s worth noting that under the hood the challenges are calling
ReactDOM.render(JSX, document.getElementById('root'))
. This function call is what places your JSX into React’s own lightweight representation of the DOM. React then uses snapshots of its own DOM to optimize updating only specific parts of the actual DOM.
Does the fact that the root element is being accessed by ID, rather than by type, imply that the root element always implicitly has the ID “root”, or is this something that is just being added by freeCodeCamp in the background for convenience?
Thanks!