php server side rendering
This file contains 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
// 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