Adam Klein
State management in a world of hooks
#1about 3 minutes
The challenge of managing local versus global state
Using hooks for local state and libraries like Redux for global state creates two mental models and makes refactoring difficult.
#2about 1 minute
Aligning local and global state management patterns
One solution is to use global state patterns, like `useReducer`, for local component state to create a consistent development experience.
#3about 4 minutes
How hooks enable superior code reusability
Hooks' reliance on call order and co-location makes it simple to extract logic into custom hooks, unlike refactoring traditional reducers.
#4about 2 minutes
Using the React Context API for shared state
The React Context API provides a native way to manage shared state using hooks, as seen in Facebook's own UI.
#5about 2 minutes
Understanding the performance drawbacks of React Context
In large applications, Context can lead to deep provider nesting and performance issues from unnecessary re-renders across the component tree.
#6about 2 minutes
The future of React Context with selectors
A proposed RFC for `useContext` aims to solve performance problems by adding a selector argument to prevent components from re-rendering unnecessarily.
#7about 4 minutes
Designing an ideal hook-based state management API
The evolution of a new state management API explored initial attempts using string keys and custom hook implementations before finding a better solution.
#8about 3 minutes
Introducing the Reusable library and its architecture
The Reusable library uses a `createStore` function to run native hooks in a dummy component, enabling direct subscriptions without Context.
#9about 4 minutes
Live demo of refactoring local state to a shared store
A live demonstration shows how to easily convert a component's local state into a global, shared store using the Reusable library.
#10about 2 minutes
Live demo of using selectors and composing stores
The demo continues by implementing selectors to optimize re-renders and shows how one store can seamlessly use data from another.
#11about 1 minute
Final thoughts on choosing the right development tools
A concluding thought emphasizes choosing tools that fit your team's needs, as today's hottest trend often becomes tomorrow's legacy code.
Related jobs
Jobs that call for the skills explored in this talk.
Matching moments
02:22 MIN
Implementing global state with React's Context API
Rethinking React State Management: The Power of Built-In Solutions
01:23 MIN
Conclusion: Benefits of using React's built-in tools
Rethinking React State Management: The Power of Built-In Solutions
03:37 MIN
Understanding the internal mechanics of React hooks
Dos and don'ts with react hooks. An opinionated approach
06:36 MIN
Architecting the solution with the React Context API
Build UIs that learn - Discover the powerful combination of UI and AI
02:40 MIN
Managing local state and the problem of prop drilling
Rethinking React State Management: The Power of Built-In Solutions
01:54 MIN
Managing async state with React 19 hooks
Building Interactive Async UI with React 19 and Ariakit
03:03 MIN
Lessons on testing, hooks, and framework lock-in
Building a large, complex product from the ground up with typescript & Atomic Design:lessons learned
04:38 MIN
Example: Combining Context, useReducer, and transformers
Rethinking React State Management: The Power of Built-In Solutions
Featured Partners
Related Videos
Rethinking React State Management: The Power of Built-In Solutions
Marc Brehmer
Dos and don'ts with react hooks. An opinionated approach
Daniel Espino Garcia
Bringing back reactivity in "reactive" frontend
Michał Moroz
React and the power of visualisation
Daisy Muyldermans
Challenges of building React and React Native apps
Milica Aleksic & Stefan Nikolic
Typescript, React and Atomic Design - a match made in heaven
Nathalia Rus
NgRx Tips for Future-Proof Angular Apps
Marko Stanimirović
Under The Hood Of Vue 3 Reactivity
Marc Backes
Related Articles
View all articles



From learning to earning
Jobs that call for the skills explored in this talk.

Nia Health GmbH
Berlin, Germany
Intermediate
Senior
CSS
GIT
React
TypeScript

Schulz.codes GmbH
Darmstadt, Germany
Intermediate
Senior
React
JavaScript
TypeScript

BSB Bremer Software & Beratungs GmbH
Bremen, Germany
Intermediate
Senior
CSS
Java
HTML
React
JavaScript
+1

Cap3 GmbH
Kiel, Germany
Intermediate
Senior
React
Angular
JavaScript
TypeScript

Haufe-Lexware GmbH & Co. KG
Freiburg im Breisgau, Germany
Intermediate
Senior
Java
React
TypeScript

doinstruct Software GmbH
Berlin, Germany
Senior
GIT
JavaScript
TypeScript

autoiXpert GmbH & Co. KG
Stuttgart, Germany
Senior
Node.js
Angular
MongoDB
TypeScript

Smartclip
Berlin, Germany
Remote
Intermediate
Figma
Node.js
GraphQL
TypeScript

K LAGAN
Málaga, Spain