Subscribe on changes!

how to exclude some variable exposed to template

avatar
Jun 2nd 2022

What problem does this feature solve?

<script setup>
const a = 0
const b = 1

// some exclude ...
// eg...just like 
exclude({
  b
})
</script>

<template>
{{a}} // 0
{{b}} // error
</template>

What does the proposed API look like?

<script setup>
const a = 0
const b = 1

// some exclude ...
// eg...just like 
exclude({
  b
})
</script>

<template>
{{a}} // 0
{{b}} // error
</template>
avatar
Jun 2nd 2022

Why?

avatar
Jun 4th 2022

If you want to keep something from the template, move the logic into a function that you then call and only return what you want to expose.