星期二, 9月 19, 2017

Middlware Arrow Function And Destructuring


const createMiddleware = (extraArgument) => ({dispatch, getState}) => (next) =>(action) => {//some code};

const createMiddleware = (extraArgument) => {
  return ({dispatch, getState}) => {
    return (next) => {
      return (action) => {//some code};
    }
  }
}