430 questions
Best practices
0
votes
2
replies
66
views
Set a computed property in a reactive store object in Vue
const store = reactive({
a: [],
b: computed(()=> a.find('needle')), use computed
c: ()=> a.find('needle') // or a method
})
How should one go about using a computed property in a ...
0
votes
1
answer
57
views
Why does inject() return the value of a ref from a reactive object instead of a reactive reference?
I'm working with Vue 3's Composition API, and I’m trying to provide a ref that is part of a reactive object. However, when I inject it in a child component, I get the raw value, not the reactive ref.
...
0
votes
0
answers
69
views
Why does update in parent component establish reactivity with AG grid?
I'm playing around with Vue Data Grid (AG Grid) and stumbled across a strange behavior wrt reactivity, exemplified by the following minimal component App (plain JS):
<script setup>
import {...
0
votes
0
answers
61
views
Maximum recursive updates exceeded error when pushing/replacing existing route with different parameter
when using the selctCategory function to replace the existing route parameters, I receive an error that states
"devices:1 Uncaught (in promise) Maximum recursive updates exceeded in component . ...
0
votes
3
answers
429
views
Best practices using composables with multiple parameters including reactivity [closed]
I am working on a vue3 project, which currently has a lot of code extracted in TypeScript files as simple functions. I have realized, that this code structure is getting dirty over time, due to its ...
0
votes
0
answers
80
views
Composable reactivity within a mix of options and composition APIs
"vue": "^2.7.16"
"nuxt": "^2.18.1"
"@nuxt/bridge": "^3.3.1"
I have a composable that is using Composition api.
import {
ref,
reactive,
} ...
0
votes
0
answers
58
views
Lifting Tiptap editor instance to Pinia store
I have a very basic tiptap editor setup in VueJS, something like this:
// TipTap.vue
<template>
<div>
<editor-content :editor="editor" spellcheck="false" />
...
0
votes
0
answers
43
views
Disabling Form Submit Button Vue3
I would like to disable the submit button in my Vue application if the user hasn't entered data in the donationInput input field. I'm sure I'm missing something basic, thanks for your help identifying ...
0
votes
1
answer
62
views
Why is Vue not acting reactive (Vue 3, Electron)
Electron app with Vue 3. Ubuntu 24.04 Chrome/98.0.4758.141 Electron/17.4.7 node v23.5.0 @vue/cli 5.0.8 [email protected]
It reads a file from local disk and loads it into a reactive variable in Vue 3 so I ...
1
vote
0
answers
31
views
How to properly update reactive array items for the changes to reflect in UI in Vue 3?
I'm relatively new to VUE JS.
I have a menu, opening onclick of a button inside a component - SelectionMatrix.vue
Inside the menu, I have
one select box at the top which has options of 5 different ...
1
vote
1
answer
57
views
Identity checks with ref values in Vue3 not working as expected
This official Vue.js documentation claims that the ref() API in Vue 3 uses getters and setters.
In Vue 3, Proxies are used for reactive objects and getter / setters are used for refs.
This would ...
0
votes
3
answers
80
views
Vue 3 rerun compute when element added to array
I have an object of documents that I manage by id within my composable, while to the outside revealing a computed (derived, readonly) state:
const state = reactive({})
export const useDocs = () => ...
1
vote
1
answer
253
views
Nuxt + Zod: input type="file" does not display the file name on the first selection
I'm working on a Nuxt project using VueJS and Zod for form validation, and one field is a input type="file". The issue is that, on the first file selection, the input does not display the ...
0
votes
1
answer
70
views
Vue 3 get delta object of reactive updates
Consider a reactive object (or array) that is dynamically populated with data:
import { reactive, computed } from 'vue'
const entries = reactive({}) // global state beyond Template level
const docs = ...
1
vote
1
answer
484
views
vue nested ref modification / why[not] loosing reactivity
I am quite a newbee to vue and would like to ask for an explanation how to cleanly accomplish this szenario:
I have an ref object which is a nested object with arrays and other objects in it.
there is ...