vue-hubs
v1.0.4
Published
### usage ```ts import createHub from 'vue-hubs';
Downloads
5
Readme
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