“Redux Dev Tool” Kod odpowiedzi

Redux DevTools

npm install --save redux-devtools-extension
Clever Cheetah

Redux DevTools Chrome

 const store = createStore(
   reducer, /* preloadedState, */
+  window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
 );
Testy Tarsier

Redux Dev Tools

//add middleware in store
 window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
Clear Copperhead

Redux DevTools

 window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
Thoughtless Termite

Redux DevTools

import { createStore, applyMiddleware } from 'redux';
import { composeWithDevTools } from 'redux-devtools-extension';

const store = createStore(reducer, composeWithDevTools(
  applyMiddleware(...middleware),
  // other store enhancers if any
));
Blushing Butterfly

Redux Dev Tool

 window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()

add this on store
const store = createStore(
  rootReducer,
  window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
);
Blue Baboon

Odpowiedzi podobne do “Redux Dev Tool”

Pytania podobne do “Redux Dev Tool”

Więcej pokrewnych odpowiedzi na “Redux Dev Tool” w JavaScript

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu