Skip to main content
Module

x/jotai/website/src/atoms/index.js

👻 Primitive and flexible state management for React
Go to Latest
File
import { atom } from 'jotai'import { atomWithImmer } from 'jotai/immer'import { atomWithStorage } from 'jotai/utils'
export const menuAtom = atom(false)export const searchAtom = atom(false)
export const textAtom = atom('hello')export const uppercaseAtom = atom((get) => get(textAtom).toUpperCase())export const darkModeAtom = atomWithStorage('darkMode', false)export const countAtom = atomWithImmer(0)