Explore Library
ReactContext API

51 items

1

React.memo Won't Stop Context Re-renders

Code Quiz
2

Nesting and Overriding Providers

Slides / Video
3

Custom Consumer Hook for Context

Slides / Video
4

Creating a Custom Provider Component

Slides / Video
5

Context with useReducer

Slides / Video
6

Memoizing Context Provider Values

Slides / Video
7

Splitting Contexts to Minimize Re-renders

Slides / Video
8

Providing Context Values with Provider

Slides / Video
9

Creating Context with createContext

Slides / Video
10

The Prop Drilling Problem

Slides / Video
11

Re-rendering of Context Consumers

Slides / Video
12

Default Values in createContext

Slides / Video
13

Passing Updaters Through Context

Code Quiz
14

Updating Context via State

Code Quiz
15

Context.Consumer Render Prop

Code Quiz
16

Nested Providers and Shadowing

Code Quiz
17

Reading Context Outside the Provider

Code Quiz
18

Default Value Without a Provider

Code Quiz
19

Providing a Context Value

Code Quiz
20

Creating a Context

Code Quiz
21

Inverted Guard in Custom Context Hook

Code Quiz
22

Swapped State and Dispatch Contexts

Code Quiz
23

Reducer Missing Default Case

Code Quiz
24

Inline Context Value Re-renders

Code Quiz
25

Context.Consumer Render Prop

Quiz
26

Memoizing Context Value

Quiz
27

Context Value Identity Pitfall

Quiz
28

Overriding Context Values

Quiz
29

Nested and Multiple Providers

Quiz
30

Context with useReducer

Quiz
31

Splitting Contexts

Quiz
32

Providing Context Values

Quiz
33

Creating a Context

Quiz
34

displayName for DevTools

Quiz
35

When to Use Context

Quiz
36

Default Value in createContext

Quiz
37

Context Re-render Behavior

Quiz
38

Custom Hook for Context

Quiz
39

Context Limitations

Flashcard
40

Default Value in createContext

Flashcard
41

Re-render on Value Change

Flashcard
42

The value Prop

Flashcard
43

Providing a Context

Flashcard
44

Memoizing Context Value

Flashcard
45

Splitting Contexts

Flashcard
46

Creating a Context

Flashcard
47

Custom useContext Hook

Flashcard
48

Context.Consumer Render Prop

Flashcard
49

Context with useReducer

Flashcard
50

Context displayName

Flashcard
51

Nesting and Overriding Providers

Flashcard
FlashcardIntermediate

Nesting and Overriding Providers

A closer Provider overrides the value from Providers higher in the tree.

Question

What happens when you nest two Providers of the same context?

Click to reveal answer