Browse Source
* Replaced old ReactDOM API with new React v18 API Replaced old ReactDOM API with new React v18 API ReactDOM.render( // Try changing to isLoggedIn={true}: <Greeting isLoggedIn={false} />, document.getElementById('root') ); The above implementation has been replaced by the following implementation according to React v18. ReactDOM .createRoot(document.getElementById('root')) .render(<LoginControl />); * Changed ReactDOM.createRoot syntax into two lines ``` ReactDOM .createRoot(document.getElementById('root')) .render(<LoginControl />); ``` has been changed to ``` const root = ReactDOM.createRoot(document.getElementById('root')); root.render(<LoginControl />); ``` * Added a comment on <Greeting/> comp.main
Muhammad Yasir
3 years ago
committed by
GitHub
1 changed files with 10 additions and 17 deletions
Loading…
Reference in new issue