Skip to content

Question: Top level ReactDOM.render() into body rather than a 'root' element #1568

Closed
@cjpete

Description

@cjpete

Is there a particular reason why the initial create-react-app index.html file and index.js file construct it so that the application root is rendered into a #root element rather than the body directly?

I can understand keeping the React application at a lower level for applications which run multiple view layers within the same document, but for an app delivered solely by React the #root element seems like a redundant DOM node.

Chris

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions