Let's talk about hooks that are not just used by component but use components themselves. This lets us co-locate state and UI.
Hey, I'm Sandro
I'm an experienced Frontend Developer based in Switzerland. I love coding, writing and cats 🐈
Let's talk about hooks that are not just used by component but use components themselves. This lets us co-locate state and UI.
In this article we'll learn how to write component stories in uncontrolled and controlled mode, that properly work together with args and controls in Storybook.
Polymorphic React components are very common and useful, but also tricky to implement and limited in what type-safety they provide. We'll talk about the problems and see an alternative approach using an asChild prop.
Reducers are not only useful for global state management. They can also be used for local component state. And compared to plain useReducer() we can reduce boilerplate code by adapting the API of modern reducer libraries like Redux Toolkit (RTK).