React Context with Hooks


Note: React Hooks are still an experimental proposal. This post was written while Hooks were in React 16.7.0-alpha.2

I’ve spent the last several days experimenting the latest React Hooks features. It really has been a blast — so much code deletion when converting from the class stuff. Being a bit newer to React, I haven’t put together any huge applications with the library/framework (I say framework) and so I wasn’t really up to speed with using React Context. I spent a bit of time learning how to use context the classic way, and once I grasped that I decided I’d get a hang of the Hooks’ method: useContext. I wanted to document what I learned along the way by showing a small app I created using it.


Wait…What is Context in React?

Read More