We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 15f41f4 commit 2f9237eCopy full SHA for 2f9237e
README.md
@@ -40,14 +40,14 @@ You can improve it by sending pull requests to [this repository](https://github.
40
We have several examples [on the website](https://reactjs.org/). Here is the first one to get you started:
41
42
```jsx
43
+import { createRoot } from 'react-dom/client';
44
+
45
function HelloMessage({ name }) {
46
return <div>Hello {name}</div>;
47
}
48
-ReactDOM.render(
- <HelloMessage name="Taylor" />,
49
- document.getElementById('container')
50
-);
+const root = createRoot(document.getElementById('container'));
+root.render(<HelloMessage name="Taylor" />);
51
```
52
53
This example will render "Hello Taylor" into a container on the page.
0 commit comments