https://github.com/amos-project/amos
A decentralized, data structure-based, all-in-one state management solution for large-scale applications.
https://github.com/amos-project/amos
reactjs recoil redux state-mangement vuex
Last synced: 5 months ago
JSON representation
A decentralized, data structure-based, all-in-one state management solution for large-scale applications.
- Host: GitHub
- URL: https://github.com/amos-project/amos
- Owner: amos-project
- License: mit
- Created: 2020-11-01T14:04:08.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-12-22T02:46:44.000Z (10 months ago)
- Last Synced: 2025-05-04T17:03:31.197Z (5 months ago)
- Topics: reactjs, recoil, redux, state-mangement, vuex
- Language: TypeScript
- Homepage: https://amos-project.github.io/amos/
- Size: 32.9 MB
- Stars: 13
- Watchers: 6
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Amos
A decentralized, data structure-based, fully featured state management library.
## Highlights
- Decentralized (or, in a more trendy term: atomic).
- Data structure-based: help you read/write state easily.
- Strong TypeScript support.
- All in one: everything in a single package `amos` with zero dependencies, including:
- All commonly used data structures: Number, Boolean, Array, Object, List, Map.
- Box relationships.
- Batch.
- Concurrent.
- Cache.
- React: Query, Suspense, Use.
- SSR.
- HTTP: Paging, Optimistic, Offline, Structure mapping.
- Persistence: including Web, React Native, IndexedDB, SQLite.
- Devtools.
- Redux compatible, helping you seamlessly and smoothly migrate from Redux to amos.## Install
You can get everything via install npm package `amos`:
```bash
# via npm
npm i -S amos
# via yarn
yarn add amos
# via pnpm
pnpm i amos
```## Documentation
You can find the Amos documentation [on the website](https://amos-project.github.io/amos/).
## Quick start
```typescript jsx
import { createStore, numberBox } from 'amos';
import { Provider, useDispatch, useSelector } from 'amos/react';
import { createRoot } from 'react-dom/client';const countBox = numberBox('count');
function Count() {
const dispatch = useDispatch();
const count = useSelector(countBox);return (
Click count: {count}.
dispatch(countBox.add(1))}>Click me
);
}const store = createStore();
createRoot(document.getElementById('root')!).render(
,
);
```