Jotai is a primitive and flexible state management library for React built with TypeScript. The library provides a minimal core API of just 2 kilobytes while scaling from simple useState replacements to enterprise-level applications. It is available via npm installation and documented at jotai.org.
The core concept of Jotai revolves around atoms, which represent pieces of state. Users create primitive atoms by specifying initial values, whether those are strings, numbers, objects, or arrays. These atoms can then be used in React components with an interface similar to the native useState hook. The library distinguishes itself from alternatives like Recoil by avoiding string keys entirely, instead relying on direct atom references.
Jotai supports derived atoms with computed values, allowing developers to create read-only atoms from existing atoms using read functions. The get function enables fetching contextual values of any atom, and multiple atoms can be combined to create derived atoms. The library also supports functional programming patterns for those who prefer that style. Async atoms are supported through async read functions, which require React Suspense boundaries. Writable derived atoms can be created by specifying a write function as the second argument, and write-only derived atoms are possible by omitting the read function entirely. Async actions are supported by making write functions asynchronous and calling set when ready.
The library's design treats atoms as monads, following established functional programming patterns for modular, pure, and robust code. This approach is documented in Jotai's functional programming guide on their website.
According to GitGenius activity tracking, the repository shows median issue and pull request response latency of 103.4 hours across 48 tracked items, though mean latency extends to 12449 hours due to some older items. The most active contributor tracked is dai-shi with 27 events, followed by omridevk with 6 events and Pinpickle with 3 events. Bug reports and documentation issues are the most frequently tracked labels with 4 items each, while help wanted issues appear 2 times. The repository shares contributors with major projects including microsoft/vscode, microsoft/typescript, and rust-lang/rust, indicating involvement from developers working across significant open source ecosystems.
The library is classified as a minimalistic API state management solution emphasizing atomic design, performance, and concurrent rendering capabilities. It supports immutable data structures and reactive programming patterns while maintaining simplicity and a lightweight footprint suitable for functional React components.