8000 add write-react-with-codepen.md · learnreactjs/learnreactjs@2edefa4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2edefa4

Browse files
committed
add write-react-with-codepen.md
1 parent 9d259e3 commit 2edefa4

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Writing React with CodePen
2+
3+
The basic setup that has been described in this chapter can be used online via [CodePen](https://codepen.io). CodePen uses the same three resources used earlier to make writing React online.
4+
5+
* `react`
6+
* `react-dom`
7+
* `babel`
8+
9+
Below is an embedded CodePen containing the `HelloMessage` component used throughout this chapter. By clicking on the "Result" tab you can view the React component rendered to the DOM. To edit the code just click on "EDIT ON CODEPEN" at the top right corner.
10+
11+
<p data-height="265" data-theme-id="dark" data-slug-hash="rvrQod" data-default-tab="result" data-user="Bunlong" data-embed-version="2" data-pen-title="rvrQod" class="codepen">See the Pen <a href="https://codepen.io/Bunlong/pen/rvrQod/">rvrQod</a> by Bunlong (<a href="https://codepen.io/Bunlong">@Bunlong</a>) on <a href="https://codepen.io">CodePen</a>.</p>
12+
<script async src="https://static.codepen.io/assets/embed/ei.js"></script>
13+
14+
Note that the "Babel" tab indicates the JavaScript written into this tab will be transformed by Babel.
15+
16+
It will be assumed that after reading this chapter that you understand the basic requirements to setup React and Babel via `babel js`. And that while CodePen does not make it obvious, this is the same exact setup being used by CodePen to run React code.
17+
18+
CodePen will be used throughout the rest of this book to show the results of React code transformed by Babel.

0 commit comments

Comments
 (0)
0