Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

redux devtools with middleware

import { applyMiddleware, compose, createStore } from "redux";
import thunk from "redux-thunk";
import rootReducer from "./rootReducer";

// for this we'll use Redux "compose" function
const enhancers = compose(
  applyMiddleware(thunk), // your own middleware
  window.devToolsExtension ? window.__REDUX_DEVTOOLS_EXTENSION__() : (f) => f
);// devtools middleware

export const store = createStore(rootReducer, enhancers);
Comment

PREVIOUS NEXT
Code Example
Javascript :: remove a class after 100 milliseconds jquery 
Javascript :: proper regex website url validation 
Javascript :: how to change a css variable with javascript 
Javascript :: javascript settimeout 
Javascript :: google dino hack 
Javascript :: javascript for loop over dictionary 
Javascript :: how to use another port in angular 
Javascript :: enable/disable textbox on checkbox click using jquery 
Javascript :: javascript replace space with minus 
Javascript :: disable a button in javascript for a time period 
Javascript :: how to import lodash in react 
Javascript :: nest js install and create project 
Javascript :: fetch put request js 
Javascript :: Slick slider arrows change 
Javascript :: 1 line unique id 
Javascript :: use json file for data jquery 
Javascript :: js vanilla dom ready 
Javascript :: express post body undefined 
Javascript :: javascript roman to integer 
Javascript :: javascript random float 
Javascript :: use application/x-www-form-urlencoded in javascript 
Javascript :: Could not resolve dependency: npm ERR! peer react@"17.0.1" from react-dom@17.0.1 
Javascript :: alphabets regex js javascript 
Javascript :: npm global flag 
Javascript :: javascript sort boolean value 
Javascript :: install moment in goole dev console 
Javascript :: jquery check a radio button 
Javascript :: javascript listen for double click 
Javascript :: jquery if class exists 
Javascript :: refresh page in next js 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =