- Know npm and JavaScript (intermediate-level)
- Know command-line
- Know Git
Treat each of these folders as it's own web root. Each one will need an npm install
. You can run a server if you wish, or each index.html
can simply be opened in a browser. Remember to install webpack globally: npm install -g webpack
- Webpack (without Babel (ES6) or React)
- Source Maps
Install
cd path/to/example
npm install
webpack
open index.html
Open
bundle.js
file, scroll to the bottom and see the "Hello World" code wrapped in a bunch of code you didn't write (which came from Webpack)
- React
- ES6 with Babel
- React with JSX
Install
cd path/to/example
npm install
webpack
open index.html
// JSX
<FirstComponent />
// React
React.createElement('div', null, 'Hello World');
// JS
var e = document.createElement('div');
e.innerHtml = 'Hello World'
- Webpack Resolve
./app
- Webpack Watch (this is implemented via command line, see below)
- Concept: Sub Components
Install
cd path/to/example
npm install
webpack -w
open index.html
- React Router
- Gulp
- Webpack
- gulp-server
- Concept:
browserHistory
Install
cd path/to/example
npm install
gulp
Visit http://localhost:8000
- No new tools, install same as last example
- Concept: Re-usable layout (App Component)
Visit http://localhost:8000
- JSON Server (just so we have a RESTful API for demo purposes)
- Axios (a popular XHR tool using promises)
- Concepts: Component Containers
Install
cd path/to/example
npm install
gulp
Visit http://localhost:3000 for database
Visit http://localhost:8000 for web app
- Redux
- Redux-Thunk
- Concepts: Stores, Reducers, Actions, Dispatch, Subscribe
Install
cd path/to/example
npm install
gulp
Visit http://localhost:8000
- react-redux
- Concepts: Provider, storeSelector, connect
Install
cd path/to/example
npm install
gulp
Visit http://localhost:8000