topsysml

0.0.1 • Public • Published

Install

Run `npm install topsysml` to install the dependencies.

Usage

First create a store

import Store from 'topsysml'

Than create action, mutation and initial state

const actions = {
    saySomething(context, payload) {
    context.commit('setMessage', payload);
}
};

const mutations = {
    setMessage(state, payload) {
    state.message = payload;

    return state;
    }

};

const initialState = {
    message: 'Hello, world'
};

Than instantiate the store

const storeInstance = new Store({
    actions,
    mutations,
    initialState
});

Readme

Keywords

none

Package Sidebar

Install

npm i topsysml

Weekly Downloads

3

Version

0.0.1

License

ISC

Unpacked Size

5.4 kB

Total Files

4

Last publish

Collaborators

  • dzimba