Skip to content

Commit a9ab627

Browse files
authored
Update rendering-elements.md (#2804)
Link each mention of a React API in rendering-elements.md to the reference docs. On this page replace every static occurrence of `ReactDOM.render()` by link to the reference docs [`ReactDOM.render()`](/docs/react-dom.html#render) Is this in the right direction @sophiebits ? 🤔 ref #2630
1 parent 2ab1ca5 commit a9ab627

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/docs/rendering-elements.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ We call this a "root" DOM node because everything inside it will be managed by R
3434

3535
Applications built with just React usually have a single root DOM node. If you are integrating React into an existing app, you may have as many isolated root DOM nodes as you like.
3636

37-
To render a React element into a root DOM node, pass both to `ReactDOM.render()`:
37+
To render a React element into a root DOM node, pass both to [`ReactDOM.render()`](/docs/react-dom.html#render):
3838

3939
`embed:rendering-elements/render-an-element.js`
4040

@@ -46,19 +46,19 @@ It displays "Hello, world" on the page.
4646

4747
React elements are [immutable](https://en.wikipedia.org/wiki/Immutable_object). Once you create an element, you can't change its children or attributes. An element is like a single frame in a movie: it represents the UI at a certain point in time.
4848

49-
With our knowledge so far, the only way to update the UI is to create a new element, and pass it to `ReactDOM.render()`.
49+
With our knowledge so far, the only way to update the UI is to create a new element, and pass it to [`ReactDOM.render()`](/docs/react-dom.html#render).
5050

5151
Consider this ticking clock example:
5252

5353
`embed:rendering-elements/update-rendered-element.js`
5454

5555
[](codepen://rendering-elements/update-rendered-element)
5656

57-
It calls `ReactDOM.render()` every second from a [`setInterval()`](https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval) callback.
57+
It calls [`ReactDOM.render()`](/docs/react-dom.html#render) every second from a [`setInterval()`](https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval) callback.
5858

5959
>**Note:**
6060
>
61-
>In practice, most React apps only call `ReactDOM.render()` once. In the next sections we will learn how such code gets encapsulated into [stateful components](/docs/state-and-lifecycle.html).
61+
>In practice, most React apps only call [`ReactDOM.render()`](/docs/react-dom.html#render) once. In the next sections we will learn how such code gets encapsulated into [stateful components](/docs/state-and-lifecycle.html).
6262
>
6363
>We recommend that you don't skip topics because they build on each other.
6464

0 commit comments

Comments
 (0)