{"id":46999,"library":"atmn","title":"atmn","description":"atmn is TypeScript library for managing application state with a focus on immutability and type safety. The current stable version is 1.1.8, released with weekly updates. It provides a simple atom-based state management pattern, similar to Recoil or Jotai, but with full TypeScript inference and minimal boilerplate. It supports both React and vanilla JavaScript, and includes built-in devtools for debugging.","status":"active","version":"1.1.8","language":"javascript","source_language":"en","source_url":"https://github.com/useautumn/typescript","tags":["javascript","typescript"],"install":[{"cmd":"npm install atmn","lang":"bash","label":"npm"},{"cmd":"yarn add atmn","lang":"bash","label":"yarn"},{"cmd":"pnpm add atmn","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"atmn is ESM-only; CJS require will fail.","wrong":"const { atom } = require('atmn')","symbol":"atom","correct":"import { atom } from 'atmn'"},{"note":"useAtom is a named export, not default.","wrong":"import useAtom from 'atmn'","symbol":"useAtom","correct":"import { useAtom } from 'atmn'"},{"note":"Atom is a TypeScript type, use type-only import to avoid runtime overhead.","wrong":"import { Atom } from 'atmn'","symbol":"type Atom","correct":"import type { Atom } from 'atmn'"}],"quickstart":{"code":"import { atom, useAtom } from 'atmn';\n\nconst countAtom = atom(0);\n\nfunction Counter() {\n  const [count, setCount] = useAtom(countAtom);\n  return (\n    <div>\n      <p>Count: {count}</p>\n      <button onClick={() => setCount(count + 1)}>Increment</button>\n    </div>\n  );\n}","lang":"typescript","description":"Creates a simple counter with an atom and useAtom hook, demonstrating basic state management in React."},"warnings":[{"fix":"Upgrade to v1.1.0+ or provide initial value explicitly.","message":"In v1.0.0, atom() required an initial value; in v1.1.0 it became optional (defaults to undefined).","severity":"breaking","affected_versions":"<1.1.0"},{"fix":"Replace `useAtomValue(atom)` with `const [value] = useAtom(atom)`.","message":"The function `useAtomValue` is deprecated in v1.1.0 and will be removed in v2.0. Use `useAtom` instead.","severity":"deprecated","affected_versions":">=1.1.0"},{"fix":"Use the setter function returned by useAtom or the `set` method on atom store.","message":"Atoms are frozen by default; attempting direct mutation will throw in strict mode.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.1.8':23 'applic':8 'atmn':1,2 'atom':33 'atom-bas':32 'base':34 'boilerpl':50 'built':61 'built-in':60 'current':19 'debug':65 'devtool':63 'focus':12 'full':45 'immut':14 'includ':59 'infer':47 'javascript':57,66 'jotai':42 'librari':5 'manag':7,36 'minim':49 'pattern':37 'provid':29 'react':54 'recoil':40 'releas':24 'safeti':17 'similar':38 'simpl':31 'stabl':20 'state':9,35 'support':52 'type':16 'typescript':4,46,67 'updat':27 'vanilla':56 'version':21 'week':26","created_at":"2026-06-07T16:49:14.275542+00:00","updated_at":"2026-06-07T16:49:14.275542+00:00","problems":[{"fix":"Install package: npm install atmn; use import syntax.","cause":"Missing TypeScript types or using CJS require instead of ESM import.","error":"Cannot find module 'atmn' or its corresponding type declarations."},{"fix":"Use setter from useAtom or atom's set method.","cause":"Attempting to directly mutate an atom's state.","error":"TypeError: object is not extensible"},{"fix":"Use useAtom instead.","cause":"useAtomValue was deprecated and removed.","error":"Module '\"atmn\"' has no exported member 'useAtomValue'."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://docs.useautumn.com/api-reference/cli/getting-started","github":"https://github.com/useautumn/typescript","docs":null,"changelog":null,"pypi":null,"npm":"atmn","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}