Questions tagged [vue-reactivity]
Questions about vue's reactivity, which is all about auto updating arrays and object properties when changed.
vue-reactivity
415
questions
0
votes
1
answer
47
views
How can I show a loader while a form is rendering in Vue 3?
I'm using Vue 3 with the Composition API. I have a TabView component with multiple TabPanel components, and each tab contains a form that takes a few seconds(3-4 seconds) to render. I want to show a ...
0
votes
1
answer
26
views
Provide / Inject value not getting updated if its reactive value is changed - VueJS
I am quite new to Vue.js coming from a React background. I have a reactive variable config which is passed to provide() function in a component and used by other component using inject(). But the the ...
0
votes
2
answers
49
views
Pinia state loosing reactivity when used in an object?
Trying to wrap my head around reactivity when it comes to states from a Pinia store.
I have the following store (@/stores/settings.js):
import { defineStore } from 'pinia'
export const useSettings = ...
1
vote
0
answers
45
views
Is the virtual DOM in VueJS redundant?
Can anyone tell me if VueJS has fine-grained reactivity, similar to signals that use a sub-push mechanism to update directly on the actual DOM? If so, does that make the virtual DOM redundant?
I want ...
1
vote
1
answer
41
views
Can't figure out reactivity in Vue
I'm more familiar with React and I've been try to port this component from React to Vue for a project. Everything about my solution seems to be working except when I update the ref value in the parent ...
0
votes
0
answers
63
views
Vue 3 onMounted not loading data in Vuetify data table server
I have created this page with Vue 3 + Vuetify called demo.vue in my project which receives data from an API server.
The problem that I'm facing is that I set up the data inside an onMounted function, ...
1
vote
1
answer
30
views
In Vue 3, am I supposed to se the whole object structure when initializing a reactive value?
Suppose I want to create an empty value in my pinia store that hold the current subscription model the user is looking at. This should be null/unset if the user is not currently on a subscription ...
3
votes
1
answer
61
views
Why is a computed property necessary for reactivity in a Vue component with Pinia store?
I am storing an authenticated user of my web app (Vue and Supabase) in a Pinia store: userStore.user. My NavBar component has a login/logout link based on this state. In order to make this reactive ...
0
votes
0
answers
23
views
Why is the reactive variable in my Vue3 component not updating, while it is updating in the composable?
I'm facing an issue with Vue3 and Nuxt3 where a reactive variable currentMatchday within my component isn't updating as expected, despite using a composable to handle its reactivity. Here's the code ...
1
vote
0
answers
54
views
Problem with reactivity of pinia getters in imported npm package (vue 2.7)
Vue 2.7.14 (options api)
Pinia 2.1.7
I have ChildApp where in "standalone" mode I normally use pinia after initializing it in main.js and everything works.
Below is my store initialization....
1
vote
2
answers
60
views
Vue computed prop change not being reflected in component if value references same object
example store:
const trigger = ref(true);
const prop = computed(() => {
trigger.value;
console.log('comp prop run'); // works!
return some_big_object;
});
const doChange = () => {
...
0
votes
0
answers
34
views
Vue ref of parent component does not trigger update of child when changed in another child (Android Chrome)
In my Vue/Vite/Vue Router project, I use a component called DefaultLayout for the basic layout of my page.
It has several slots, like action-left, action-right, title and default:
<!-- layouts/...
0
votes
1
answer
58
views
Vue3 Loosing reactivity on object, when being passed as prop
I've encountered a strange behavior while migrating from Vue2 to Vue3.
When creating a new object in the parent component with an asynchronous function being called in the constructor, that ...
0
votes
1
answer
200
views
Vue3: data from Pinia store not arriving
I can't pull Pinia data after page reload using the Composition API.
So, I'm using Vue to digest some fetched JSON. I'm new to the Composition API. But reading the docs I can't see what's missing ...
-1
votes
1
answer
45
views
Vue 3 reactive anti-pattern [closed]
I would like to ask about Vue 3 reactivity system. Im working with Vue 3 for some time. But today, I saw something I have never seen before. Our senior dev wrote something like this
const store = ...