filmov
tv
React Hooks - useReducer vs useState

Показать описание
I thought it'd be fun to look at implementing the same application with two different apis from React Hooks. It's exciting to see that React is becoming so flexible with several different ways to manage state.
You'll learn how to separate UI vs Application state and why that means unit testing is simplified. In addition, I'll show you how to add full type inference with useState and useReducer.
Finally, I explain some of the deeper implementation details of how useState works and where you can find performance improvements in your application.
You'll learn how to separate UI vs Application state and why that means unit testing is simplified. In addition, I'll show you how to add full type inference with useState and useReducer.
Finally, I explain some of the deeper implementation details of how useState works and where you can find performance improvements in your application.