As a newcomer to Vue, I wanted to track how many times a function in the computed section gets called. To achieve this, I created the following component:
const ComputedCounter = {
name: "ComputedCounter",
template: `
<span>{{ value }}</span>
`,
computed: {
value() {
const current = this.value || 0;
return current + 1;
}
}
}
Unfortunately, I encountered an error saying 'Error in render: "InternalError: too much recursion"'. I'm not sure why this is happening and if there's a solution to make it work properly.