Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/jotai/src/vanilla/utils/atomWithReducer.ts>atomWithReducer

👻 Primitive and flexible state management for React
Go to Latest
function atomWithReducer
import { atomWithReducer } from "https://deno.land/x/jotai@v2.1.0/src/vanilla/utils/atomWithReducer.ts";

Type Parameters

Value
Action

Parameters

initialValue: Value
reducer: (value: Value, action?: Action) => Value

Type Parameters

Value
Action

Parameters

initialValue: Value
reducer: (value: Value, action: Action) => Value