Learning Redux
上QQ阅读APP看书,第一时间看更新

Setting up the entry files

Now that we have webpack and Babel set up, we just need to create our entry point files:

First, let's create a very simple src/index.js file:

console.log('hello world!')

The src/index.js file (including all imports and dependencies) will be transpiled into a main.js file by Babel.

Then, we create an index.html file, which will be the entry point for our web application:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Learning Redux</title>
</head>
<body>
<div id="root"></div>
<script src="main.js"></script>
</body>
</html>