π² branch:
git checkout start
Let's begin π―, In this section you will get to know about how easy it is to include React in your simple website!
π‘ TLDR: You know some JavaScript & have worked with HTML before
src
folder & which includes couple of files namely; index.html
& app.js
βοΈNOTE: if you open
index.html
file, you'll notice certain code is commented and above every comment there will be a comment number. You will have to follow the sequence and uncomment those commented code to acheive the required results. (Will guide you.)
<script
crossorigin
src="https://unpkg.com/react@16/umd/react.development.js"
></script>
<script
crossorigin
src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"
></script>
π‘ TLDR: for more visit this link; CDN Links
react
will provide us use of some of the top level api's we can use in react-app and react-dom
is a package that provides DOM specific methods that can be used at the top level of a web app to enable an efficient way of managing DOM elements of the web page.π‘ TLDR; Read more about Top-level-api's & ReactDOM
createElement()
React.createElement(type, [props], [...children]);
π Tip: Code written with
JSX
will be compiles down to React.createElement() calls. This will be done byBabel
(A JavaScript Compiler)