diff --git a/content/blog/2022-03-08-react-18-upgrade-guide.md b/content/blog/2022-03-08-react-18-upgrade-guide.md index 677682a39cc..e11951899cf 100644 --- a/content/blog/2022-03-08-react-18-upgrade-guide.md +++ b/content/blog/2022-03-08-react-18-upgrade-guide.md @@ -40,9 +40,8 @@ render(, container); // After import { createRoot } from 'react-dom/client'; const container = document.getElementById('app'); -const root = createRoot(container); +const root = createRoot(container); // createRoot(container!) if you use TypeScript root.render(); - ``` We’ve also changed `unmountComponentAtNode` to `root.unmount`: