src/reactor/fns.js
function createCacheEntry(reactorState, getter) {
  // evaluate dependencies
  const args = getDeps(getter).map(dep => evaluate(reactorState, dep).result)
  const value = getComputeFn(getter).apply(null, args)

  const storeDeps = getStoreDeps(getter)
  const storeStates = toImmutable({}).withMutations(map => {
    storeDeps.forEach(storeId => {
      const stateId = reactorState.getIn(['storeStates', storeId])
      map.set(storeId, stateId)
    })
  })

  return CacheEntry({
    value: value,
    storeStates: storeStates,
    dispatchId: reactorState.get('dispatchId'),
  })
}
function createCacheEntry(reactorState, getter) {
  // evaluate dependencies
  const args = getDeps(getter).map(dep => evaluate(reactorState, dep).result)
  const value = getComputeFn(getter).apply(null, args)

  const storeDeps = getStoreDeps(getter)
  const storeStates = toImmutable({}).withMutations(map => {
    storeDeps.forEach(storeId => {
      const stateId = reactorState.getIn(['storeStates', storeId])
      map.set(storeId, stateId)
    })
  })

  return CacheEntry({
    value: value,
    storeStates: storeStates,
    dispatchId: reactorState.get('dispatchId'),
  })
}
function createCacheEntry ( reactorState , getter ) { // evaluate dependencies const args = getDeps ( getter ) . map ( dep => evaluate ( reactorState , dep ) . result ) const value = getComputeFn ( getter ) . apply ( null , args ) const storeDeps = getStoreDeps ( getter ) const storeStates = toImmutable ( { } ) . withMutations ( map => { storeDeps . forEach ( storeId => { const stateId = reactorState . getIn ( [ 'storeStates' , storeId ] ) map . set ( storeId , stateId ) } ) } ) return CacheEntry ( { value : value , storeStates : storeStates , dispatchId : reactorState . get ( 'dispatchId' ) , } ) }
Evaluates getter for given reactorState and returns CacheEntry
@param {ReactorState} reactorState
@param {Getter} getter
@return {CacheEntry}
Evaluates getter for given reactorState and returns CacheEntry