Mar 31, 2025
1
Level 6
How to test performance in Vue?
I'm trying to test the performance of a code block. I don't know if this is the "right way" of doing it.
var start;
const alert = computed(() => {
start = performance.now()
const test = {
alertClass: props.alertClass,
}
return test
})
onMounted(() => {
console.log(alert.value)
var end = performance.now()
console.log(end - start)
})
Please or to participate in this conversation.