src/tinier.js
function runSignalSetup (component, address, stateCallers) {
  const signalsAPI = makeSignalsAPI(component.signalNames, false)
  const childSignalsAPI = makeChildSignalsAPI(component.model)
  const reducers = patchReducersWithState(address, component, stateCallers.callReducer)
  const signals = patchSignals(address, component, stateCallers.callSignal)
  const methods = patchMethods(address, component, stateCallers.callMethod,
                               reducers, signals)
  // cannot call signalSetup any earlier because it needs a reference to
  // `methods`, which must know the address
  component.signalSetup({
    methods,
    reducers,
    signals: signalsAPI,
    childSignals: childSignalsAPI,
  })
  return { signalsAPI, childSignalsAPI }
}
function runSignalSetup (component, address, stateCallers) {
  const signalsAPI = makeSignalsAPI(component.signalNames, false)
  const childSignalsAPI = makeChildSignalsAPI(component.model)
  const reducers = patchReducersWithState(address, component, stateCallers.callReducer)
  const signals = patchSignals(address, component, stateCallers.callSignal)
  const methods = patchMethods(address, component, stateCallers.callMethod,
                               reducers, signals)
  // cannot call signalSetup any earlier because it needs a reference to
  // `methods`, which must know the address
  component.signalSetup({
    methods,
    reducers,
    signals: signalsAPI,
    childSignals: childSignalsAPI,
  })
  return { signalsAPI, childSignalsAPI }
}
function runSignalSetup ( component , address , stateCallers ) { const signalsAPI = makeSignalsAPI ( component . signalNames , false ) const childSignalsAPI = makeChildSignalsAPI ( component . model ) const reducers = patchReducersWithState ( address , component , stateCallers . callReducer ) const signals = patchSignals ( address , component , stateCallers . callSignal ) const methods = patchMethods ( address , component , stateCallers . callMethod , reducers , signals ) // cannot call signalSetup any earlier because it needs a reference to // `methods`, which must know the address component . signalSetup ( { methods , reducers , signals : signalsAPI , childSignals : childSignalsAPI , } ) return { signalsAPI , childSignalsAPI } }
Run signalSetup with the component.
@param {Object} component -
@param {Array} address -
@param {Object} stateCallers -
@return {Object} Object with keys signalsAPI and childSignalsAPI.
Run signalSetup with the component .