() => <React />
Stepan Parunashvili
1
Babel $ npm install -g babel-cli
4
Arrow Functions () =>
6
Classesclass Component {}
12
Modulesimport User from 'user'
17
Larger Standard LibraryMap, Set, WeakMap, Promise...
20
Smarter Object Expressions{users}
21
Destructuring in arguments({name, friends}) => console.log(name, friends)
27
Default Arguments(name = 'Bob') => console.log(name)
32
Template Strings`hello ${name}`
35
More destructuringvar [first, ...rest] = users
38
SplataddFriends(...friends)
44
Block scoping: let & constlet i = 0;
50
SymbolsIterators
Generators
57
Async / Await var users = await getUsers();
58
Declarative > Imperative{opened ? <FriendList /> : null}
66
incrementappend, decrement, replace
73
(data) => markup
81
Composabilityfriends.map(friend => <Info friend={friend} />)
86
89
http://handlebarsjs.com/expressions.html
Separation of Concerns?
91
Coupling vs Cohesion
92
Cohesion<button onClick={this._handleClick}>Click me</button>
93
ui logic + markup are cohesive
96
But, large apps are large
102
Keep components small
103
Keep state in a single place
104
Optimize last
105
Use Immutable Data Structures
106
There's more
113
flowredux
hot reloading
114
thank you :)
115