Notes

React

This main purpose of React is managing state inside of your application. It's just a state manager. As you update state so does all of your UI

Imperative vs Declarative

Imperative code is tell the computer how to do something…(each step, do this, add that, loop this)

var name = "John";

function changeName(newname) {
   name = newname;
}

changeName('Peter');

Declarative is Abstraction.

var number = [1,2,3,4];
numbers.reduce(function (previous, current) 
  return previous + current
});
  • Declarative reduces side effects.
  • More readable.
  • Less bugs.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License