Design Patterns · Junior · Question 38 of 75

Which pattern do React Context and <Provider> implement?

Explanation

A provider solves prop drilling: the theme, current user and i18n are available to any descendant. There can be any number of contexts, and the same context can be provided with different values in different parts of the tree.

Further reading

Problem with a question

Design Patterns · Junior · question 38

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