Posts

Showing posts from February, 2017

Quick Basics of ReactJs, Redux & Redux-Saga

React ( Docs ) React makes it painless to create interactive UIs. Design simple views for each state in your application. React is Declarative: Imperative would say (like JQuery): if (user.likes()) { if(!hasBlue()) { removeGrey(); addBlue(); } } else{ if(hasBlue()) { removeBlue(); addGrey(); } } Declarative would say: if (this.state.liked) { return <bluelike/>; } else{ return <greylike/>; } We now can use ES6 and a summary of features is  http://es6-features.org/ Component Life Cycles: Mounting These methods are called when an instance of a component is being created and inserted into the DOM: constructor() componentWillMount() render() componentDidMount() Updating An update can be caused by changes to props or state. These methods are called when a component is being re-rendered: componentWillReceiveProps() shouldComponentUpdate() componentWillUpdate() render() componentDidUpdate() Unmounting This metho