How to use the redux-devtools-extension.devToolsEnhancer function in redux-devtools-extension

To help you get started, we’ve selected a few redux-devtools-extension examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eclipsesource / jsonforms-react-seed / src / index.tsx View on Github external
done: true,
  recurrence: 'Daily',
  rating: 3
};

const initState: JsonFormsState = {
  jsonforms: {
    cells: materialCells,
    renderers: materialRenderers
  }
};

const rootReducer: Reducer = combineReducers({
  jsonforms: jsonformsReducer()
});
const store = createStore(rootReducer, initState, devToolsEnhancer({}));
store.dispatch(Actions.init(data, schema, uischema));

// Register custom renderer for the Redux tab
store.dispatch(Actions.registerRenderer(ratingControlTester, RatingControl));

ReactDOM.render(, document.getElementById('root'));
registerServiceWorker();
github fabien0102 / gatsby-starter / src / store.ts View on Github external
// Reducer
export const reducer = (state: StoreState, action: ToggleSidebar): StoreState => {
  switch (action.type) {
    case TOGGLE_SIDEBAR:
      return Object.assign({}, state, { isSidebarVisible: !state.isSidebarVisible });
    default:
      return state;
  }
};

// Store
export const initialState: StoreState = { isSidebarVisible: false };
export const store = createStore(
  reducer,
  initialState,
  devToolsEnhancer({}),
);
github researchstudio-sat / webofneeds / webofneeds / won-owner-webapp / src / main / webapp / app / configRedux.js View on Github external
[
      /* middlewares, that wrap the reducer 
           *(they get the state, can do stuff, apply the reducer, do stuff and return a modified state) 
           */
      "ngUiRouterMiddleware",
      thunk,
      piwikMiddleware,
    ],
    [
      /* store enhancers (i.e. f::store->store') */
      /*
            * store enhancer that allows using the redux-devtools
            * see https://github.com/zalmoxisus/redux-devtools-extension and
            * https://www.npmjs.com/package/ng-redux#using-devtools for details.
            */
      devToolsEnhancer({
        trace: true,
        traceLimit: 10,
        serialize: {
          immutable: Immutable,
        },
      }),
      // Specify name here, actionsBlacklist, actionsCreators and other options if needed
    ]
  );
}
github Programming-With-Love / curly-succotash / src / store.ts View on Github external
}
export const toggleSidebar = () => ({ type: TOGGLE_SIDEBAR })

// Reducer
export const reducer = (state: StoreState, action: ToggleSidebar): StoreState => {
  switch (action.type) {
    case TOGGLE_SIDEBAR:
      return Object.assign({}, state, { isSidebarVisible: !state.isSidebarVisible })
    default:
      return state
  }
}

// Store
export const initialState: StoreState = { isSidebarVisible: false }
export const store = createStore(reducer, initialState, devToolsEnhancer({}))
github tvillarete / apple-music-js / src / js / rootReducer.js View on Github external
import { devToolsEnhancer } from 'redux-devtools-extension';
import viewReducer from './views/reducer';
import apiReducer from './api/reducer';
import audioReducer from './audio/reducer';
import navReducer from './components/bar/reducer';

const rootReducer = combineReducers({
   viewState: viewReducer,
   apiState: apiReducer,
   audioState: audioReducer,
   navState: navReducer,
});

const store = createStore(
   rootReducer,
   devToolsEnhancer(),
   applyMiddleware(thunkMiddleware),
);

export default store;
github react-cosmos / react-cosmos / examples / redux / configureStore.js View on Github external
export default function(initialState) {
  const store = createStore(reducer, initialState, devToolsEnhancer());

  return store;
}
github SaltieRL / DistributedReplays / webapp / src / Redux / index.ts View on Github external
import {notificationsReducer, NotificationsState} from "./notifications/reducer"
import {tagsReducer, TagsState} from "./tags/reducer"

export interface StoreState {
    loggedInUser: LoggedInUserState
    notifications: NotificationsState
    tags: TagsState
}

const rootReducer: Reducer = combineReducers({
    loggedInUser: loggedInUserReducer as any,
    notifications: notificationsReducer as any,
    tags: tagsReducer as any
})

export const store = createStore(rootReducer, devToolsEnhancer({}))

export * from "./loggedInUser/actions"
export * from "./notifications/actions"
export * from "./tags/actions"
github zroyer / juggle-and-drop / src / index.js View on Github external
import { createStore, combineReducers } from "redux";
import { Provider } from "react-redux";
import { devToolsEnhancer } from "redux-devtools-extension";
import { BrowserRouter } from "react-router-dom";
import reducers from "./client/reducers/reducers";
import App from "./client/containers/App";
import registerServiceWorker from './registerServiceWorker';

const preloadedState = window.PRELOADED_STATE;

delete window.PRELOADED_STATE;

const store = createStore(
  combineReducers(reducers),
  preloadedState,
  devToolsEnhancer()
);


ReactDOM.render(
  
    
      
    
  ,
  document.getElementById('root')
);
registerServiceWorker();