React · Senior · Question 33 of 75

What is the signature of a Redux middleware?

Explanation

Currying gives the middleware access to getState/dispatch, the next link in the chain next, and the current action. A middleware can log, modify, delay or replace actions (e.g. thunk calls functions instead of passing them on). (state, action) => newState is a reducer.

Further reading

Problem with a question

React · Senior · question 33

Test yourself

Take the React · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz