mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-25 23:05:23 +00:00
[docs]: Updated CodePen links (#4232)
Signed-off-by: Aniruddha Shriwant <aniruddhashriwant@gmail.com>
This commit is contained in:
committed by
GitHub
parent
d80ef566a3
commit
f062ee271b
@@ -38,7 +38,7 @@ To render a React element into a root DOM node, pass both to [`ReactDOM.render()
|
||||
|
||||
`embed:rendering-elements/render-an-element.js`
|
||||
|
||||
[](codepen://rendering-elements/render-an-element)
|
||||
**[Try it on CodePen](https://codepen.io/gaearon/pen/ZpvBNJ?editors=1010)**
|
||||
|
||||
It displays "Hello, world" on the page.
|
||||
|
||||
@@ -52,7 +52,7 @@ Consider this ticking clock example:
|
||||
|
||||
`embed:rendering-elements/update-rendered-element.js`
|
||||
|
||||
[](codepen://rendering-elements/update-rendered-element)
|
||||
**[Try it on CodePen](https://codepen.io/gaearon/pen/gwoJZk?editors=1010)**
|
||||
|
||||
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.
|
||||
|
||||
@@ -66,7 +66,7 @@ It calls [`ReactDOM.render()`](/docs/react-dom.html#render) every second from a
|
||||
|
||||
React DOM compares the element and its children to the previous one, and only applies the DOM updates necessary to bring the DOM to the desired state.
|
||||
|
||||
You can verify by inspecting the [last example](codepen://rendering-elements/update-rendered-element) with the browser tools:
|
||||
You can verify by inspecting the [last example](https://codepen.io/gaearon/pen/gwoJZk?editors=1010) with the browser tools:
|
||||
|
||||

|
||||
|
||||
|
||||
Reference in New Issue
Block a user