3/10/2018 - 1:40 PM

React Fudamental Notes

this.setState({}) -> updates the state 

lifecycle methods:

better to use than componentWillMount
constructor() {super()} -> once component creates itself 

Recact Based::

componentWillMount() { } -> before component mounts (renders)

componentDidMount () { } -> component just rendered
// trigers a re-render
// add dynamic data from an endpoint (not to block the entire app)
// is this sync???

refs:: access dom elements on events
ref = (input) => this.input = input

2 way binding react
onChange set a function that updates the state

propTypes setting the types of the props