[Vuejs]-How can I get the count of Object keys in a Vue template?

0👍

I can’t find the Vue 3 version of this but I believe you’re running into change detection caveats (Vue doesn’t know you’re adding a new key to the object, so it does not re-render)

See https://v2.vuejs.org/v2/guide/reactivity.html#For-Objects

EDIT Can you clarify if you’re on Vue 2 or 3? This answer says this problem shouldn’t affect you in Vue 3

Leave a comment