Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amos

Package Overview
Dependencies
Maintainers
0
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amos

An out-of-the-box state management library designed for your large-scale projects.

  • 0.3.0-beta.37
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
593
decreased by-13.93%
Maintainers
0
Weekly downloads
 
Created
Source

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:

# 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.

Quick start

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 (
        <div>
            <span>Click count: {count}.</span>
            <button onClick={() => dispatch(countBox.add(1))}>Click me</button>
        </div>
    );
}

const store = createStore();

createRoot(document.getElementById('root')!).render(
    <Provider store={store}>
        <Count />
    </Provider>,
);

Keywords

FAQs

Package last updated on 15 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc