Summary
In this chapter, we learned a new approach: combining React Context and Subscription. It provides the benefits of both: providing isolated values in subtrees and avoiding extra re-renders. This approach is useful for mid to large apps. In such apps, having different values in different subtrees can happen, and we can avoid extra re-renders, which can be very important for our apps.
Starting from the next chapter, we will dive into various global state libraries. We will learn how those libraries are based on what we have learned so far.