ReactJS vs/(and?) Angular
Behind the code..
Agenda
You know angular
What is React ?
Why React ?
What’s in it ?
Why Frameworks ?
Only one reason
Predictability
Application Architecture
Angular - MVVM
React - FLUX
MVVM
FLUX
FLUX for React
Angular Vs React
Angular React
Controller
Directive
Service
Factory
Provider
Module
.config
.run
bootstrap
Component
Understanding React
JSX
React Component
State and Props
Mixins
React Virtual DOM
JSX
Javascript Syntax Extension that looks like XML
NameSpacing
React
Component
Virtual DOM
React.createElement(‘div’) - type,props,ref,key
refs
React.findDOMNode
e.g. React.findDOMNode(this.refs.myinput).focus()
React Component Methods
render()
getInitialState()
getDefaultProps()
propTypes:{}
mixins:[]
statics:{}
componentWillMount()
componentDidMount()
componentWillRecieveProps()
shouldComponentUpdate()
componentWillUpdate()
componentDidUpdate()
componentWillUnmount()
Form
<input>,<textarea>,<option>,<select>
Controlled vs Uncontrolled
input[type=text|password|date|email],textarea,select : value
input[type=checkbox|radio]:checked
option:selected
Validation .. ?
Event System
SyntheticEvent <wrapper>nativeEvent</wrapper>
onClick,onChange,onInput
onTouchStart,onTouchEnd
onFocus,onBlur
onKeyDown,onKeyPress
Few more things
propTypes
refs ( referencing dom elements)
React.render
React.createElement
React.DOM.[div,ul,...]
this.props.children(like angular transclude)
React.addons
two-way binding
Performance Tools
Still to Explore
Server side rendering
Unit testing with React
Animation
React.addons
Variations for ES6

React Vs AnagularJS