[docs]: Updated CodePen links (#4232)

Signed-off-by: Aniruddha Shriwant <aniruddhashriwant@gmail.com>
This commit is contained in:
Aniruddha Shriwant
2022-01-27 17:09:28 +05:30
committed by GitHub
parent d80ef566a3
commit f062ee271b
4 changed files with 9 additions and 9 deletions

View File

@@ -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:
![DOM inspector showing granular updates](../images/docs/granular-dom-updates.gif)