@easy-peasy/core
v3.2.6
Published
Standalone version of easy-peasy
Downloads
4
Readme
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']