21 lines
554 B
TypeScript
21 lines
554 B
TypeScript
import { createStore, combineReducers } from "redux";
|
|
|
|
import { MusicState } from "./music/types";
|
|
import { musicStateReducer } from "./music/reducers";
|
|
|
|
export interface State {
|
|
musicState: MusicState;
|
|
}
|
|
|
|
const rootReducer = combineReducers<State>({
|
|
musicState: musicStateReducer,
|
|
});
|
|
|
|
export const store = createStore(
|
|
rootReducer,
|
|
// @ts-expect-error - These properties are set by the devtools extension
|
|
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
|
|
);
|
|
|
|
export type Dispatch = typeof store.dispatch;
|