Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

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

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

Parameters

initialValue: Value

Returns

WritableAtom<Value, [SetStateActionWithReset<Value>], void> & WithInitialValue<Value>