Socket
Socket
Sign inDemoInstall

amos

Package Overview
Dependencies
15
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

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.


Version published
Weekly downloads
285
increased by87.5%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

amos

Amos is an out-of-the-box state management library designed for large scale projects.

The amos is the all-in-one package for all the builtin modules of amos. It includes several entrypoint, each entrypoint contains one or more packages. The entrypoint are:

entrypointincluded packages
amos
  • amos-core
  • amos-boxes
  • amos-shapes
  • amos-io
  • amos-persist
  • amos-devtools
  • amos-utils
amos/react
  • amos-react
amos/redux
  • amos-redux

Install

npm i -S amos
# or via yarn
yarn add amos

Quick start

import { createStore, NumberBox } from 'amos';
import { Provider, useDispatch, useSelector } from 'amos-react';
import { createRoot } from 'react-dom/client';

const countBox = new 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

Last updated on 04 Aug 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc