Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1103 from derkoe/react-18
React 18 in peer-dependencies and use new API
- Loading branch information
Showing
4 changed files
with
23 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
import React from 'react' | ||
import ReactDOM from 'react-dom' | ||
import App from './App' | ||
import { createRoot } from 'react-dom/client'; | ||
|
||
|
||
it('renders without crashing', () => { | ||
const div = document.createElement('div') | ||
ReactDOM.render(<App />, div) | ||
const root = createRoot(div); | ||
root.render(<App />) | ||
ReactDOM.unmountComponentAtNode(div) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import './index.css' | ||
|
||
import React from 'react' | ||
import ReactDOM from 'react-dom' | ||
import App from './App' | ||
|
||
ReactDOM.render(<App />, document.getElementById('root')) | ||
const root = createRoot(document.getElementById('root')) | ||
root.render(<App />) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters