You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/computed-values/main-v2.html

17 lines
211 B

<p>{a} + {b} = {c}</p>
<p>{c} * {c} = {cSquared}</p>
<script>
export default {
data: () => ({
a: 1,
b: 2
}),
computed: {
c: ({ a, b }) => a + b,
cSquared: ({ c }) => c * c
}
};
</script>