Skip to content

Commit

Permalink
Update Example render for React v18 (#24259)
Browse files Browse the repository at this point in the history
  • Loading branch information
Noel Kim (김민혁) committed Apr 3, 2022
1 parent b8cfda1 commit e912da9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -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 <div>Hello {name}</div>;
}

ReactDOM.render(
<HelloMessage name="Taylor" />,
document.getElementById('container')
);
const root = createRoot(document.getElementById('container'));
root.render(<HelloMessage name="Taylor" />);
```

This example will render "Hello Taylor" into a container on the page.
Expand Down

0 comments on commit e912da9

Please sign in to comment.