The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Redux: The Middleware Chain

Redux: The Middleware Chain

8:44
We will learn how we can generalize wrapping dispatch() for different purposes into a concept called “middleware” that is widely available in the Redux ecosystem.
Watch this lesson now
Avatar
egghead.io

We will learn how we can generalize wrapping dispatch() for different purposes into a concept called “middleware” that is widely available in the Redux ecosystem.

Avatar
Ningze

what is the point of having store as the first parameter in the curry function? I didn't see anywhere you use the store in the logger or promise function.

Avatar
Ron Keiser

According to the transcript, Dan describes the pattern of a function returning a function as 'Korean' although he almost certainly means to say 'currying.'

Avatar
mobility-team

When you'll reach video 23, you'll get it :) I think he writes it this way, because he knows he'll need it later...

In reply to Ningze
Avatar
Brickwork

Im not sure if this was a mistake or something that I'm missing in the code that's being explained but around 6:40 you describe that the middlewares are passed in the reverse order that they are being defined but from what I can see (and I ran this through the debugger,) since the promise function is defined first and after the array is reversed, is therefore sent through last. In the video you're saying that the logger is sent last. Although this logically makes sense to me it seems as though its not functioning this way since the logger action would be undefined as demonstrated in an earlier video.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?