// Generated by Vue on Rails github.com/vueonrails/vueonrails // Generate a component part like this by running command `rails generate vue something` // Display this Vue component by adding `require('./<%= name %>')` to app/javascript/packs/application.js
// import store from '@/store' export default {
data: function() { return { // sharedState: store.state, message: "Hello <%= name %>!", items: [] }; }, watch: { onCreated: function(response) { this.items = response.data; } }, methods: { //Add the button to your .vue template: <button @click="onClick">click this</button> onClick: function() { console.log("clicked"); } }, computed: {} // props: {}, // components: {}, // mixins: [], // directives: {}, // filters: {}, // asyncComputed: {}, // yarn add vue-async-computed
};