docs: non-null assertion is needed on document.getElementById (#8540)

This commit is contained in:
Dale Seo
2024-02-11 23:10:17 -05:00
committed by GitHub
parent 19cb3ab6ff
commit f88855da4f

View File

@@ -43,7 +43,7 @@ Let's build our first bundle. You have the following two files, which implement
import * as ReactDOM from 'react-dom/client';
import {Component} from "./Component"
const root = ReactDOM.createRoot(document.getElementById('root'));
const root = ReactDOM.createRoot(document.getElementById('root')!);
root.render(<Component message="Sup!" />)
```