Source code

Revision control

Copy as Markdown

Other Tools

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const {
thunk,
const {
applyMiddleware,
createStore,
// Reducers
const {
ManifestState,
const {
WorkersState,
const {
PageState,
const {
UiState,
function configureStore(telemetry) {
// Prepare initial state.
const initialState = {
manifest: new ManifestState(),
page: new PageState(),
ui: new UiState(),
workers: new WorkersState(),
};
const middleware = applyMiddleware(
thunk(),
eventTelemetryMiddleware(telemetry)
);
return createStore(rootReducer, initialState, middleware);
}
exports.configureStore = configureStore;