DEV Community

Sandrina Pereira
Sandrina Pereira

Posted on

React Context cheatsheet

The React Context API is one of the hottest features in React 16. However, it is one of those features where I see more developers struggling with, especially when consuming the context.

Since its release I’ve been facing / asking / answering the same questions over and over again: How to use a component that consumes React Context and test it with Enzyme.

This cheatsheet reflects my journey of discoveries related to React Context API and how to test it using Enzyme. If you find something wrong, missing or outdated, please let me know and I'll update it. 👩‍💻

Discussion (0)