1.0.4 • Published 1 year ago

vue-hubs v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

lines of code that can replace vuex/pinia

usage

import createHub from 'vue-hubs';

const hub = createHub( {
    data: {
        bar: 'your data'
    },
    computed: {
        foo() { return this.bar + 'ready' }
    },
    created() {
        this.bar += ' is '
    },
    methods: {
        hello() {
            console.log(this.foo)
        }
    }
})


hub.hello()


// hub is reactive, and can be used in <template>.

export default hub
1.0.4

1 year ago

1.0.3

1 year ago