@exmg/lit-base
Version:
Lit Base Elements for ExMachina
21 lines • 557 B
JavaScript
let connectedStore;
/**
* Connects a given store
* @param store Redux store
* @param debug Default to false,
*/
export const connectStore = (store, debug) => {
debug && console.log('connectStore', store);
connectedStore = store;
};
/**
* Returns the store that was set through `connectStore`
* @return the connected store
*/
export const getConnectedStore = () => {
if (!connectedStore) {
throw new Error('Store not found, did you forget to implement it ?');
}
return connectedStore;
};
//# sourceMappingURL=connect.js.map