core-vapor icon indicating copy to clipboard operation
core-vapor copied to clipboard

`v-memo`

Open sxzz opened this issue 2 years ago • 0 comments

v-memo in vapor mode is completely different, compared to vue-core. Since in vapor mode, we use effect (aka watchEffect) to track & update DOM nodes.

So to implement it, I think watch function is enough.

<div v-memo="[msg]">{{ msg }}{{ count }}</div>

Compiles to

watch([msg], () => {
  setText(...)
})

  • [ ] Runtime watch function
  • [ ] Compiler part

sxzz avatar Nov 29 '23 20:11 sxzz