Make thread building more idiomatic by using memoization (#3436)
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.
Showing
Please register or sign in to comment