Remember, if you want to follow along, clone this repo:
git clone https://github.com/pzavolinsky/rtw-react.git
We'll start with some scaffolding, for this project we'll need TypeScript, Webpack and some other stuff so let's get that:
git checkout 0-empty
npm ci
Well, this is pretty straight forward, we have:
-
public/index.html this is the static HTML page for out project. The only two interesting bits of this file are these:
<div id="root"></div> <script src="bundle.js" type="text/javascript"></script>
That is:
- a div with known as
root
where we are going to put our code - a reference to
bundle.js
that is the file that results from compiling src/index.ts
- a div with known as
-
src/index.ts a (currently empty) file that will hold our code.
Ready for the first challenge?