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
  • 389,373
  • 58
  • 564
  • 602
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
  • 11,056
  • 1
  • 15
  • 21