deno.land / x / jotai@v1.8.4 / docs / introduction.mdx

introduction.mdx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---title: Introductiondescription: Table of contentsnav: 0---
Welcome to the Jotai documentation! Jotai is a primitive and flexible state management library for React. It takes a bottom-up approach with an atomic model inspired by Recoil.
## Features
- Minimal API- TypeScript oriented- Tiny bundle size (3kb)- Many extra utils and official integrations- Supports Next.js and React Native## Installation
`npm install jotai` or `yarn add jotai`
## Basics
Learn the basic concepts and primitives of the library, discover how it compares with other solutions, and see examples of it in use.
<TOC section="basics" />## Guides
These guides can help with common use cases such as async behavior, TypeScript, and Next.js.
<TOC section="guides" />## API
Jotai has a very minimal API, exposing only a few exports from the main `jotai` bundle. Each is explained in more detail in the Core doc. Jotai also has a nice devtool for debugging and a few helpful Babel plugins.
<TOC section="api" />## Utilities
Jotai also includes a `jotai/utils` bundle with a variety of extra utility functions. One example is `atomWithStorage`, which includes localStorage persistence and browser tab synchronization.
<TOC section="utils" />## Integrations
Jotai has separate bundles for many official integrations including `atomWithQuery` for React Query and `atomWithMachine` for XState, among many others.
<TOC section="integrations" />## Advanced recipes
These recipes can help with more advanced patterns.
<TOC section="advanced-recipes" />
jotai

Version Info

Tagged at
a year ago