admin/desktop/browser.js
/**
 * higher order component that injects stores to a child.
 * takes either a varargs list of strings, which are stores read from the context,
 * or a function that manually maps the available stores from the context to props:
 * storesToProps(mobxStores, props, context) => newProps
 */
higher order component that injects stores to a child.
takes either a varargs list of strings, which are stores read from the context,
or a function that manually maps the available stores from the context to props:
storesToProps(mobxStores, props, context) => newProps
higher order component that injects stores to a child . takes either a varargs list of strings which are stores read from the context or a function that manually maps the available stores from the context to props : storesToProps ( mobxStores props context ) = > newProps
function inject()  {
    var grabStoresFn = void 0
    if (typeof arguments[0] === "function") {
        grabStoresFn = arguments[0]
        return function(componentClass) {
            var injected = createStoreInjector(grabStoresFn, componentClass)
            injected.isMobxInjector = false 
            injected = observer(injected)
            injected.isMobxInjector = true 
            return injected
        }
    } else {
        var storeNames = []
        for (var i = 0; i < arguments.length; i++) {
            storeNames[i] = arguments[i]
        }
        grabStoresFn = grabStoresByName(storeNames)
        return function(componentClass) {
            return createStoreInjector(grabStoresFn, componentClass, storeNames.join("-"))
        }
    }
}
function inject ( ) { var grabStoresFn = void 0 if ( typeof arguments [ 0 ] === "function" ) { grabStoresFn = arguments [ 0 ] return function ( componentClass ) { var injected = createStoreInjector ( grabStoresFn , componentClass ) injected . isMobxInjector = false injected = observer ( injected ) injected . isMobxInjector = true return injected } } else { var storeNames = [ ] for ( var i = 0 ; i < arguments . length ; i ++ ) { storeNames [ i ] = arguments [ i ] } grabStoresFn = grabStoresByName ( storeNames ) return function ( componentClass ) { return createStoreInjector ( grabStoresFn , componentClass , storeNames . join ( "-" ) ) } } }
higher order component that injects stores to a child.
higher order component that injects stores to a child .
/* fn(stores, nextProps) or ...storeNames */ // supress warning // mark the Injector as observer, to make it react to expressions in `grabStoresFn`, // see #111 // restore warning