퉁이리
2 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
2 deletions
src/content/reference/react-dom/unmountComponentAtNode.md
@ -56,7 +56,7 @@ unmountComponentAtNode(domNode);
Call `unmountComponentAtNode` to remove a < CodeStep step = {1} > mounted React component</ CodeStep > from a < CodeStep step = {2} > browser DOM node</ CodeStep > and clean up its event handlers and state.
```js [[1, 5, "< App / > "], [2, 5, "rootNode"], [2, 8, "rootNode"]]
import {render, unmountComponentAtNode} from 'react-dom';
import { render, unmountComponentAtNode } from 'react-dom';
import App from './App.js';
const rootNode = document.getElementById('root');
@ -90,7 +90,7 @@ In this example, clicking "Render React App" will render a React app. Click "Unm
```js index.js active
import './styles.css';
import {render, unmountComponentAtNode} from 'react-dom';
import { render, unmountComponentAtNode } from 'react-dom';
import App from './App.js';
const domNode = document.getElementById('root');