JS is always hot
- 2012-Backbone is so hot
- 2014-Angular is so hot
- 2015-React is so hot
Why React?
- Fast
- Pluggable
- Virtual DOM
- JSX
- Isomorphic Rendering
- Unidirectional Flow
Virtual DOM
- Compare DOM's current state to desired new state
- Update the DOM in the most efficient way
- Synthetic Events
- Isomorphic Support
- React Native
JSX
- "HTML" in JavaScript
- Differences: className, htmlFor
- Compiles to JavaScript
- Inline style can be good
- Optional
Why JSX
- Angular, Ember, knockout uses "JS" in HTML
- <div ng-repeat ="user in users">
- {{#each user in users}}
- HTML doesn't tell typo in HTML
- JS will throws error in the line it happens
One step at a time
- First step - absolute beginners
- Second step - small app
- Third step - grid and charts
- Fourth step - large app
Simple application with React
Life cycle methods
- componentWillMount
- componentDidMount
- componentWillRecieveProps
- shouldComponentUpdate
- componentWillUpdate
- componentDidUpdate
- compnentWillUnmount
component spec
React Router
- Complete routing library
- Simple api
- Lazy loading
- Dynamic route matching
- Location transition handling
react-router
Flux flow