• Robert Knight's avatar
    Make thread building more idiomatic by using memoization (#3436) · 47d6c81e
    Robert Knight authored
    The idiomatic way to create derived data structures from data in the
    Redux state store is to do:
    
      derivedData = transform(select(store.getState()))
    
    Where the `select` function extracts the relevant fields from the state
    and the `transform` function then computes the derived data. Both
    `select` and `transform` can be trivially memoized to avoid unnecessary
    recalculations.
    
    This simplifies `root-thread` by avoiding inheritance from EventEmitter
    and in future will make it easier to avoid rebuilding the thread if none
    of the relevant application state has changed.
    47d6c81e
Name
Last commit
Last update
h Loading commit data...
scripts Loading commit data...
.hound.yml Loading commit data...
.jscsrc Loading commit data...
.jshintignore Loading commit data...
.jshintrc Loading commit data...
gulpfile.js Loading commit data...
package.json Loading commit data...