Skip to content

Instantly share code, notes, and snippets.

@andikasputra
Created August 6, 2021 02:39
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
php server side rendering
// App.vue
<template>
<div id="app">
<sidebar title="Mantap"></sidebar>
<h1>{{message}}</h1>
<p class="good">{{count}}</p>
<button v-on:click="increment">increment</button>
<p>{{user.name}}</p>
<feature-item v-for="feature in features" :key="feature.id" :feature="feature"></feature-item>
</div>
</template>
<script>
import Sidebar from './Sidebar.vue'
import FeatureItem from './FeatureItem.vue'
export default {
data() {
return {
message: 'Hello World',
count: 0,
user: this.$store.state.user,
features: this.$store.state.features
}
},
methods: {
increment() {
this.$data.count++
}
},
components: {
Sidebar,
FeatureItem
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment