How to Use React’s Context API and useContext() Hooks Effectively

Avoid prop drilling both your values and your functions with the help of Context

Paige Niedringhaus
Better Programming
Published in
7 min readMar 3, 2020

--

Photo by Robert Horvick on Unsplash

Introduction

At work recently, I was faced with a problem that’s quite common, thanks to React’s one-way data flow. At a high level of my application, I opened a checkout drawer that…

--

--

Staff Software Engineer at Blues, previously a digital marketer. Technical writer & speaker. Co-host of Front-end Fire & LogRocket podcasts