0

I am studying about the React using textbook. There are some codes I cant understand in the book.

const loggerMiddleware = store => next => action => {
}

I know the anonymous function in the javascript.

(a, b, c) => {
}

But, what is this?

store => next => action => {
}

please help me.

Pointy
  • 405,095
  • 59
  • 585
  • 614
NJS
  • 31
  • 4

1 Answers1

1

It's a higher-order function, i.e. a function that returns a function. It means the same as

store => next => {
    return action => { }
}

mbojko
  • 13,503
  • 1
  • 16
  • 26