code: function createStoreInjector(grabStoresFn, component, injectNames) {
      let displayName =
          "inject-" +
          (component.displayName ||
              component.name ||
              (component.constructor && component.constructor.name) ||
              "Unknown")
      if (injectNames) displayName += "-with-" + injectNames
  
      class Injector extends Component {
          static displayName = displayName
  
          storeRef = instance => {
              this.wrappedInstance = instance
          }
  
          render() {
              // Optimization: it might be more efficient to apply the mapper function *outside* the render method
              // (if the mapper is a function), that could avoid expensive(?) re-rendering of the injector component
              // See this test: 'using a custom injector is not too reactive' in inject.js
              let newProps = {}
              for (let key in this.props)
                  if (this.props.hasOwnProperty(key)) {
                      newProps[key] = this.props[key]
                  }
              var additionalProps =
                  grabStoresFn(this.context.mobxStores || {}, newProps, this.context) || {}
              for (let key in additionalProps) {
                  newProps[key] = additionalProps[key]
              }
  
              if (!isStateless(component)) {
                  newProps.ref = this.storeRef
              }
  
              return createElement(component, newProps)
          }
      }
  
      // Static fields from component should be visible on the generated Injector
      hoistStatics(Injector, component)
  
      Injector.wrappedComponent = component
      Object.defineProperties(Injector, proxiedInjectorProps)
  
      return Injector
  }
docs: Store Injection