Introduction to React Hooks
Details
SetState is Dead, Long Live UseState: AN INTRODUCTION TO REACT HOOKS
Join SWFL Coders and Casey Metz for this awesome presentation about React Hooks.
React is good at sharing, most of the time. The library’s hallmark strength is the ease with which you can share UI, state, and data across your application. However, sharing stateful logic has been a different story, especially when dealing with functional components. The quest to re-use behavior across components has given rise to a pair of workable-but-not-super-awesome patterns: First came the “Higher Order Component” (HOC) pattern, which got the job done, but at the price of producing artificially hierarchical and deeply nested component trees. Next came the “RenderProps” pattern, which can be difficult to read and intuit. The problem is that React has no native API for sharing stateful logic—that is, until now.
The React “Hooks” proposal introduces several sharable utility methods for “hooking” into React’s core state-related logic, even from functional components. We’ll take a tour of a few of these hooks, and see how they stack up against the HOC and Render Props patterns. We’ll also look at some of the “gotchas” with hooks, discuss how they can replace lifecycle methods, and ponder whether or not we’ll ever have to write `extends Component` again.
AGENDA:
6:30 - Arrival /Networking
6:45 - Introduction and announcements by the organizers
6:50 - Companies/Employers Needs: Connect to local developers
7:00 - Introduction to React Hooks
8:20 - Wrap Up
8:30 - After party celebration at Patio de Leon (courtyard behind Downtown Pizza)
ABOUT THE SPEAKER:
Casey is a JavasScript developer who works primarily in React. He and his partner, also a remote-based developer, live in Milwaukee, Wisconsin, except for during the winter when they stay in Sarasota, embracing their identities as the “Youngest Snowbirds Ever.”
