CodePamoja
CodePamoja means "Code Together" in Swahili. We are a group of passionate developers in The Netherlands and Kenya working together in virtual teams, transferring the latest software development skills to each other.
statemanagement with
one-way data flow
State, data property. Actions, methods property.
View, template property.
<template>
<h1>{{ value }}</h1>
</template>
<script>
export default {
name: "counter",
props: ["value"]
};
</script>
<style>
// ...
</style>
<template>
<div id="app">
<counterValue :value="count"></counterValue>
<button v-on:click="increment">increment</button>
<button v-on:click="decrement">decrement</button>
</div>
</template>
<script>
// ...
// state
data() {
return {
count: 2
};
},
// ...
</script>
<style>
// ...
</style>
<template>
<h1>{{ value }}</h1>
</template>
<script>
export default {
name: "counter",
props: ["value"]
};
</script>
<style>
// ...
</style>
<template>
<div id="app">
<counterValue :value="count"></counterValue>
<button v-on:click="increment">increment</button>
<button v-on:click="decrement">decrement</button>
</div>
</template>
<script>
// ...
// state
data() {
return {
count: 2
};
},
// ...
</script>
<style>
// ...
</style>
Flow
By CodePamoja
CodePamoja means "Code Together" in Swahili. We are a group of passionate developers in The Netherlands and Kenya working together in virtual teams, transferring the latest software development skills to each other.