DEV Community

Discussion on: React 18 Alpha is out! Now what?

Collapse
 
ajcwebdev profile image
ajcwebdev

Thanks for the write up Cassidy and thank you to the React team for all the work they've done to include the community in these processes.

Also watch out for the capital D in getElementById!

const root = ReactDOM.createRoot(document.getElementByID('root'));
Enter fullscreen mode Exit fullscreen mode

Should be:

const root = ReactDOM.createRoot(document.getElementById('root'));
Enter fullscreen mode Exit fullscreen mode
Collapse
 
cassidoo profile image
Cassidy Williams

Good call, updating!

Collapse
 
ajcwebdev profile image
ajcwebdev

I created a little sample application as well using Vite with Netlify deployment included.

github.com/ajcwebdev/ajcwebdev-rea...

dev.to/ajcwebdev/a-first-look-at-r...

ajcwebdev-react18.netlify.app/

Collapse
 
aslemammad profile image
Mohammad Bagher Abiyat

This shows that Cassidy hasn't writtien any vanilla js for months๐Ÿ˜‚

Thread Thread
 
ajcwebdev profile image
ajcwebdev • Edited

Hey, I actually had to search StackOverflow to figure out the error and had never once thought about the casing of DOM methods.