There is this code:
const priceWrap = ref(null)
const priceWrapSizes = useElementSize(priceWrap)
const priceWrapHeight = priceWrapSizes.height
const priceElementsQuantity = ref(3)
const priceTestWrapData:any = ref({})
function compositionPriceWrapElements (priceElementsNumber:any) {
const key = 'anyValue' + priceElementsNumber.toString()
Object.assign(priceTestWrapData, { [priceElementsNumber]: key })
priceTestWrapData.value[key] = 'test' + priceElementsNumber.toString()
console.log(priceElementsNumber)
console.log(priceTestWrapData.value)
}
watch(priceWrapHeight, (currentValue) => {
for (let priceElementsNumber = 0; priceElementsNumber < priceElementsQuantity.value; priceElementsNumber++) {
compositionPriceWrapElements(priceElementsNumber)
}
store.commit('gettingPriceWrapHeight', currentValue)
})
When it is worked out in DevTools, everything is displayed correctly
And the question is about it:
Why is each iterable key-value displayed on it three times in each log?
(And at this time the iterator in the console fulfills the 1st time as it should be.)
Doesn't it have something to do with proxy objects and Vue3 behavior in this context with them?
Is this generally normal behavior?