diff --git a/README.md b/README.md index 8f2e04c6a9f96..d2f0e08ecc945 100644 --- a/README.md +++ b/README.md @@ -40,14 +40,14 @@ You can improve it by sending pull requests to [this repository](https://github. We have several examples [on the website](https://reactjs.org/). Here is the first one to get you started: ```jsx +import { createRoot } from 'react-dom/client'; + function HelloMessage({ name }) { return
Hello {name}
; } -ReactDOM.render( - , - document.getElementById('container') -); +const root = createRoot(document.getElementById('container')); +root.render(); ``` This example will render "Hello Taylor" into a container on the page.