lib/index.js
/**
 * Connect to the Redux store in a background page.
 *
 * @param {string} name - A name that identifies the connecting component,
 *     useful for debugging.
 * @param {PortFactory<ReduxMessage} portFactory - A function that takes a
 *     callback which will be invoked with a new browser.runtime port. The
 *     default value here will suffice in almost all cases.
 *
 * @returns {Promise} A promise resolving to an object conforming to the Redux
 *    store API that can be used transparently with code expecting a Redux
 *    store object, such as the React redux bindings.
 */
Connect to the Redux store in a background page.
@param {string} name - A name that identifies the connecting component,
useful for debugging.
@param {PortFactory<ReduxMessage} portFactory - A function that takes a
callback which will be invoked with a new browser.runtime port. The
default value here will suffice in almost all cases.

@returns {Promise} A promise resolving to an object conforming to the Redux
store API that can be used transparently with code expecting a Redux
store object, such as the React redux bindings.
Connect to the Redux store in a background page . @param { string } name - A name that identifies the connecting component useful for debugging . @param { PortFactory<ReduxMessage } portFactory - A function that takes a callback which will be invoked with a new browser . runtime port . The default value here will suffice in almost all cases . @returns { Promise } A promise resolving to an object conforming to the Redux store API that can be used transparently with code expecting a Redux store object such as the React redux bindings .
function connectStore(name = "default", portFactory = defaultPortFactory) {
  return new Promise((resolve, reject) => {
    let store = (0, _redux.createStore)(s => s, undefined, connectedStore(name, portFactory));
    store.connected.then(() => resolve(store));
  });
}
function connectStore ( name = "default" , portFactory = defaultPortFactory ) { return new Promise ( ( resolve , reject ) => { let store = ( 0 , _redux . createStore ) ( s => s , undefined , connectedStore ( name , portFactory ) ) ; store . connected . then ( ( ) => resolve ( store ) ) ; } ) ; }
Connect to the Redux store in a background page.
Connect to the Redux store in a background page .