Browse Source

[Beta] Update links and add fix MD syntax error in react-dom/client Doc (#5056)

* [Beta] Update some document content format in API/react-dom/client Doc

* [Beta] Remove semicolon from intro
main
zqran 3 years ago
committed by GitHub
parent
commit
3fa19507af
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      beta/src/content/apis/react-dom/client/createRoot.md
  2. 2
      beta/src/content/apis/react-dom/client/index.md

4
beta/src/content/apis/react-dom/client/createRoot.md

@ -347,7 +347,7 @@ import App from './App.js';
const root = createRoot(document.getElementById('root'));
root.render(<App />);
````
```
Until you do that, nothing is displayed.
@ -362,7 +362,7 @@ const domNode = document.getElementById('root');
console.log(domNode); // ???
const root = createRoot(domNode);
root.render(<App />);
````
```
For example, if `domNode` is `null`, it means that [`getElementById`](https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById) returned `null`. This will happen if there is no node in the document with the given ID at the time of your call. There may be a few reasons for it:

2
beta/src/content/apis/react-dom/client/index.md

@ -34,7 +34,7 @@ You'll also need to install the same version of [React.](/apis/react)
## Browser Support {/*browser-support*/}
ReactDOM supports all popular browsers, including Internet Explorer 9 and above. [Some polyfills are required](http://todo%20link%20to%20js%20environment%20requirements/) for older browsers such as IE 9 and IE 10.
ReactDOM supports all popular browsers, including Internet Explorer 9 and above. [Some polyfills are required](TODO:/link-to-js-environment-requirements) for older browsers such as IE 9 and IE 10.
## Exports {/*exports*/}

Loading…
Cancel
Save