Skip to content
Advertisement

Tag: vue-component

Vue 3: Why get same value before update object

I have 2 components in my project where I tried create query based search filter PostsList component: PostFilter component: I must send one API request when filters is change/update. But why I get same values in activeFilters and in coming filters from method setFilters() of PostsList component on everytime? Why I lose old value of activeFilters before set new values

Creating an dropdown menu using a Vue instance

I switched from React to Vue and for me there are some incomprehensible nuances I want to create a drop-down menu, but I have some incomprehensible things related to this who is familiar with React knows that you can create a certain property with a boolean value inside a state or using hooks then when clicking on the buttons, use

Importing a function in Vue 3 setup

Currently, im trying to call a throttle/debounce function in my Vue component, but every time it’s called a Uncaught TypeError: functionTD is not a function si throw here is my code. useThrottleDebounce.ts and this is when it’s called inside setup in my component Answer The issue is that useThrottleDebounce doesn’t return a function, therefore functionTD is not a function:

Vuex 4, State is empty in component

I am trying to access subjects store state using this.$store.state.subjects inside my home component however it comes up as an empty array. Using console.log the only place I am able to see the state.subjects populated is if its in the mutation function. Anywhere else the console.log is empty. It seems to me that the state is not persisting from the

v-slot is always undefined in VueJS

Here is the problem. Root view: Grid component (container): And finally grid item component: I’m getting the error: GridItem.vue Uncaught (in promise) TypeError: Cannot read property ‘testData’ of undefined. I’m cracked my head trying to understand what’s going wrong. Need help, thanks for your time. Answer Get your slot props in Home component:

Advertisement