Browse Source

docs: add-missing-space-in-unmount-component-at-node (#5875)

main
퉁이리 2 years ago
committed by GitHub
parent
commit
d818391e6f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/content/reference/react-dom/unmountComponentAtNode.md

4
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');

Loading…
Cancel
Save