npm

@easy-peasy/core
TypeScript icon, indicating that this package has built-in type declarations

3.2.6 • Public • Published

Standalone version

npm install @easy-peasy/core
yarn add @easy-peasy/core

Basic Usage

import { createStore, action } from '@easy-peasy/core';

const store = createStore({
  todos: {
    items: ['JavaScript'],
    add: action((state, payload) => {
      state.items.push(payload)
    })
  }
});

store.getActions().add('TypeScript');
store.getState().items; // ['JavaScript', 'TypeScript']

Readme

Keywords

Package Sidebar

Install

npm i @easy-peasy/core

Weekly Downloads

0

Version

3.2.6

License

MIT

Unpacked Size

408 kB

Total Files

14

Last publish

Collaborators

  • cyriacbr