Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
development:javascript:react [2020/02/27 12:45]
kalenpw created
development:javascript:react [2021/06/29 15:04] (current)
kalenpw
Line 1: Line 1:
 ====== React ====== ====== React ======
 +  * [[.react:pub_sub_event_bus | Pub Sub/Event Bus]]
 +  * [[.react:absolute_imports | Absolute Imports ]]
  
 +----
 ===== Redux ===== ===== Redux =====
 <code> <code>
Line 9: Line 12:
 react-redux allows integration with react react-redux allows integration with react
  
-calling <code>store.dispatch({type: "INCREMENT"});</code> will call your reducer with the given action+calling ''store.dispatch({type: "INCREMENT"});'' will call your reducer with the given action
  
 An action is simply an object with a type property to indicate what we are doing An action is simply an object with a type property to indicate what we are doing
 +
 +----
 +===== Immutability Helpers =====
 +Useful to prevent yourself from mutating the state
 +<code javascript>
 +const projects = update(this.state.projects, {0: {name: {$set: "new name"}}});
 +</code>
 +----