React Redux

From bibbleWiki
Revision as of 04:06, 23 May 2020 by Iwiseman (talk | contribs)
Jump to navigation Jump to search

Unidirectional

Data only flows one direction

Pure Functions

  • Like static is c#/c++ only using inputs to produce outputs
 function multiply(a, b)
 {
   return a * b;
 }
  • No side effects
  • Also yields same result

Immutability

ES6 allows us to copy objects using Object.assign e.g.

var state = {color:'red', name: 'Adam', point:5}
var state2 = Object.assign({}, state, {point:50})