Frontend Jul 15, 2019

Hooked on Context: Managing External State

reactweek.nyc @reactweek

Drew Wyatt - Hooked on Context: Managing External State | React Week NY ‘19 Imperative SDKs can be annoying to deal with in React (a self-proclaimed declarative library). While it’s never been inherently difficult to wrap an SDK inside of a ComponentClass, it’s easy to tightly couple things, or put make a class responsible for more than is healthy. Testing can also be a pain. Hooks and Context provide a means to isolate concerns into small, testable pieces that are loosely coupled. This talk focuses on breaking a class into smaller pieces, creating a custom hook, and highlighting the behavior of useContext, useReducer, useCallback, and useEffect.

Drew works on the Digital team at Peloton, where he helps stream fitness classes to thousands of members. He’s a typed language enthusiast, Texas native, and obsessive automator. @djwyatt