Skip to content

Commit

Permalink
chore: update react-dom import for React 18 (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
egor-xyz authored Oct 18, 2023
1 parent 344b7b3 commit d34df0d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions guides/framework-integration/react-with-typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,10 @@ You should now be able to start writing and using React components in your Elect
{% tabs %}
{% tab title="src/app.tsx" %}
```tsx
import * as ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';

function render() {
ReactDOM.render(<h2>Hello from React!</h2>, document.body);
}

render();
const root = createRoot(document.body);
root.render(<h2>Hello from React!</h2>);
```
{% endtab %}

Expand Down

0 comments on commit d34df0d

Please sign in to comment.