fullstack-hy2020 / fullstack-hy2020.github.io

https://fullstack-hy2020.github.io
Other
1.52k stars 3.81k forks source link

Part 1 courseinfo example solution for index.js outdated #3640

Open virhe opened 3 months ago

virhe commented 3 months ago

The example index.js solution given for the courseinfo task uses deprecated React features.

import ReactDOM from 'react-dom'
import App from './App'

ReactDOM.render(
  <App />, 
  document.getElementById('root')
)

should be

import ReactDOM from 'react-dom/client'
import App from './App'

ReactDOM.createRoot(document.getElementById('root')).render(<App />)