dan
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
3 deletions
-
content/docs/hello-world.md
|
|
@ -9,9 +9,8 @@ next: introducing-jsx.html |
|
|
|
The smallest React example looks like this: |
|
|
|
|
|
|
|
```jsx |
|
|
|
ReactDOM |
|
|
|
.createRoot(document.getElementById('root')) |
|
|
|
.render(<h1>Hello, world!</h1>); |
|
|
|
const root = ReactDOM.createRoot(document.getElementById('root')); |
|
|
|
root.render(<h1>Hello, world!</h1>); |
|
|
|
``` |
|
|
|
|
|
|
|
It displays a heading saying "Hello, world!" on the page. |
|
|
|