Redux debugger store.ts

PHOTO EMBED

Mon Oct 04 2021 04:30:49 GMT+0000 (Coordinated Universal Time)

Saved by @ExplodeMilk #typescript #react.js

import { createStore }from 'redux';
import { RootAction } from './action';

import { RootState } from './state';
import { rootReducer } from './reducer';

declare global {
    /* tslint:disable:interface-name */
    interface Window {
       __REDUX_DEVTOOLS_EXTENSION__: any
    }
}

const store = createStore<RootState, RootAction, {}, {}>(
    rootReducer, 
    window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
);

export default store;
content_copyCOPY

https://cms.tecky.io/mod/page/view.php?id