@macrof/shared
Version:
React MicroFrontend Shared, Typescript, Webpack 5, ModuleFederation
21 lines (20 loc) • 686 B
JavaScript
import { MF_TYPES } from '../..';
import { AFactoryStore } from './factory/AFactoryStore';
export class RootStore extends AFactoryStore {
constructor(rootContainer) {
super();
this.rootContainer = rootContainer;
this.logger = this.rootContainer.get(MF_TYPES.ILogger);
this.http = this.rootContainer.get(MF_TYPES.IHttpService);
this.process = this.rootContainer.get(MF_TYPES.IResponseService);
this.loader = this.rootContainer.get(MF_TYPES.ILoader);
}
init() {
return {
logger: this.logger,
http: this.http,
process: this.process,
loader: this.loader,
};
}
}