DEV Community

Discussion on: Everything You Need to Know About the React 18 RC

Collapse
 
teetotum profile image
Martin

I suggest a small fix for the old render vs new render code snippet:

// The new way: 
const root = ReactDOM.createRoot(document.getElementById('root')); 
root.render(<App/>);
Enter fullscreen mode Exit fullscreen mode
Collapse
 
kathryngrayson profile image
Kathryn Grayson Nanz

Good catch, thank you!

Some comments have been hidden by the post's author - find out more