Last active
November 20, 2019 21:23
-
-
Save tiagolr/c8d8f786cda058f91a1d5eab63ebd836 to your computer and use it in GitHub Desktop.
alternative to vuex-store
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// main.js | |
import Vue from 'vue' | |
Vue.prototype.$store = new Vue({ | |
data: { | |
firstName: 'Foo', | |
lastName: 'Bar' | |
}, | |
computed: { | |
fullName: function () { | |
return this.firstName + ' ' + this.lastName | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment