Design Patterns · Junior · Question 21 of 75

Which pattern underlies middleware in Express or Redux?

Explanation

A request passes through a sequence of handlers: each can handle it, modify it or pass it to the next via next(). This is how logging, authorization and body parsing are added without changing the main handler.

Further reading

Problem with a question

Design Patterns · Junior · question 21

Test yourself

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

Take this quiz