r/learnreactjs • • Jun 01 '22

Dreprecation Issue

Here is it, it seems most YouTube courses on react is using deprecated syntax, on Udemy, I am thinking of buying Maximilian Schwarzmüller's course, do anyone of recent know if the course is up to date?

2 Upvotes

2 comments sorted by

View all comments

Show parent comment

1

u/Emmyxiano Jun 01 '22

I think for jsx, the syntax used there gave me an error what worked was; const root = ReactDOM.create Root(document.querySelector()) Then root.render(<div> </div). This then pose problems in the function syntax. Which anytime I try that for components, I keep getting syntax error in the console.