0.2.2 • Published 2 years ago

@vuextnd/core v0.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Vue eXTensions (XT)

This project helps VUEX developers to create featured-based modules, with well-known reusable patterns.

It also allows Typescript developers to use strong types when accessing state properties.

VUEXT is only compatible with version 4.x of VueX, and version 3.x of Vue.

Instalation

If using npm:

npm install --save @vuextnd/core

Usage (basic)

You can create a module by adding

/* This is your items type */
export interface Item {
    id: string;
}

export function createMyCustomModule<A>()  {

    const module : Module<> = {
        namespaced: true,
        
        /* ... Add your custom state, mutations and actions here ... */
    }


    const featured = addFeatures(module,        
            withItems<Item>(),  // Allows you have a collection of items
            withSelectedItem<Item>(), // Allows you to have a single selected item
            withSearch(),   // Allows you have search
            withLoading(),  // Adds loading state management (during AJAX request)
            withPaging(),   // Allows you to have paging control over the collection
    )

    return featured;
}
0.2.1

2 years ago

0.2.0

2 years ago

0.2.2

2 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago