Conclusion

Let's conclude how contextType property solved a few of the nesting problems.

The contextType property does solve the nesting problem a little bit. However, when we discuss hooks in a later chapter, you’ll see how they offer a much better solution.


In the next chapter, we will learn about another important concept of React.memo.

Get hands-on with 1200+ tech skills courses.