Using ES6

In notebook:
Building Modern Web Apps
Created at:
2016-01-20
Updated:
2016-01-21
Tags:
JavaScript Fundamentals React libraries Webpack
The ES5 version:
  var React = require('react');

var Hello = React.createClass({
    render: function(){
        return <div>Hello, {this.props.name}</div>
    }
});

React.render(<Hello name="henrik"/>, document.body);
The ES6 version:
  import React from "react"

const Hello = React.createClass({
    render () {
        return <div>Hello, {this.props.name}</div>
    }
});

React.render(<Hello name="henrik"/>, document.body);
const and let 
block scoped
const he uses for everything unless he's going to mutate later the value. It gives context for the reader (knows we're not going to change it). Also helps catching errors (the build tool/linter will complain).
He suggest to never use var in ES6.
webpack and babel
github hjs-webpack configures webpack