Skip to content

quick-start.md updates of Render in DOM section #175

Description

@dkoudela

Hi All,
The following code does not work with the latest version (https://github.com/diegomura/react-pdf-site/blob/master/docs/quick-start.md):
ReactDOM.render(<App />, document.getElementById('root'));

I have found following solution:

// Ensure your page has a root element with id='root', e.g.: <div id="root"></div>
const root = ReactDOM.createRoot(document.getElementById('root') as Element);
root.render(<App />);

I can create a merge request if you allow me to do so.
Otherwise, could you please update the documentation?
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions