import { useReducer } from "https://deno.land/x/fathym_atomic_design_kit@v0.0.120/src/src.deps.ts";
An alternative to useState
.
useReducer
is usually preferable to useState
when you have complex state logic that involves
multiple sub-values. It also lets you optimize performance for components that trigger deep
updates because you can pass dispatch
down instead of callbacks.
An alternative to useState
.
useReducer
is usually preferable to useState
when you have complex state logic that involves
multiple sub-values. It also lets you optimize performance for components that trigger deep
updates because you can pass dispatch
down instead of callbacks.