src/injection.js
function getDynamicProps({ keys, maps, inputs }, outputs, alfaStore) {
  const _props = getInjectedProps(inputs, outputs, alfaStore)

  if (maps) {
    keys.forEach(key => {
      _props[key] = _props[maps[key]]
    })
    // Map outputs
    if (outputs && 'function' === typeof _props.set) {
      // The `set` of `props` which is obtained from calling
      // `alfaStore.setWithOutputs(outputs)`
      const _setWithOutputs = _props.set
      // Call `_setWithOutputs` with maps if
      _props.set = function(key, value) {
        _setWithOutputs(key, value, maps)
      }
    }
    return _props
  } else {
    // No mapped props
    return _props
  }
}
function getDynamicProps({ keys, maps, inputs }, outputs, alfaStore) {
  const _props = getInjectedProps(inputs, outputs, alfaStore)

  if (maps) {
    keys.forEach(key => {
      _props[key] = _props[maps[key]]
    })
    // Map outputs
    if (outputs && 'function' === typeof _props.set) {
      // The `set` of `props` which is obtained from calling
      // `alfaStore.setWithOutputs(outputs)`
      const _setWithOutputs = _props.set
      // Call `_setWithOutputs` with maps if
      _props.set = function(key, value) {
        _setWithOutputs(key, value, maps)
      }
    }
    return _props
  } else {
    // No mapped props
    return _props
  }
}
function getDynamicProps ( { keys , maps , inputs } , outputs , alfaStore ) { const _props = getInjectedProps ( inputs , outputs , alfaStore ) if ( maps ) { keys . forEach ( key => { _props [ key ] = _props [ maps [ key ] ] } ) // Map outputs if ( outputs && 'function' === typeof _props . set ) { // The `set` of `props` which is obtained from calling // `alfaStore.setWithOutputs(outputs)` const _setWithOutputs = _props . set // Call `_setWithOutputs` with maps if _props . set = function ( key , value ) { _setWithOutputs ( key , value , maps ) } } return _props } else { // No mapped props return _props } }
Load dependencies with the result of calling `keys` function of the component.

This gives people the ability to load dynamic dependencies based on the props
of the component at runtime.
It makes a map between the dynamic names of the dependencies and the names
of the properties injected in `state` of the component.
That helps maintaining a simple naming system in the application code.

@param  {Function} keys
@param  {Object} props
@param  {Array} outputs
@param  {Object} alfaStore
@return {Object}
Load dependencies with the result of calling keys function of the component .