Skip to content

Tag: vuejs2

Vue v-for and variable logic unclear

trying to code a chatPage from a tutorial, the tutorial was releases in vue 2.0 and now i wanna use the new vue 3.0 version. I have a messageContainer which will display the chatMessages. it has the messages as an array and it should loop over them and display each one as a messageItem. Yet, the syntax with t…

How to merge a object to a array object in vuejs

I have a api response.data And my component .vue I want merge placeholder object to result after api response Answer Result is actually a list. You can use the destructuring assignment to prepend the placeholder. To use concat you must wrap the placeholder in a list. to achieve the same result in a “mor…

Mounting a Components Library in Vue 3

I am new to Vue.js and trying to migrate a Vue.js 2 migration to Vue.js 3. I have read the Vue.js instructions on how to that carefully; however, the application that I need to migrate contains a Component Library out of Vue.js 2 components that I need to mount in the migrated app aswell. This is the Vue.js 2…

How to benchmark a function in VueJs Store?

I have the following script in my VueJs2 Store Config, and I suspect that the if statement below is causing extra load, even if not triggered, but I’m unsure: Being new to testing in JS in general, I would like to hear suggestions as to the best methods of benchmarking and debugging this further, any ti…