All Questions
169 questions
1
vote
1
answer
59
views
Handling Asynchronous API Calls with Ordered Results in Vuejs
In my project, I want to implement a feature that calls up to n APIs (where n ≤ 4) to fetch images and then displays them in a list. I use a state called listImages to manage this.
Here’s how it ...
1
vote
1
answer
451
views
Using Nuxt Apollo to pull product detail within a Pinia Store
I like the idea of doing a lot of my queries in specific pinia stores as I can reuse those functions everywhere in my code however I am struggling to implement it. I have the following pinia store to ...
1
vote
2
answers
53
views
Use promise to modify reactive data. The position of promise will cause the number of triggers to decrease
First Approach
const list = reactive([1, 2, 3, 4, 5]);
const handleClick = () =>{
list.push(...[11, 12, 13, 14, 15]);
list.push(...[16, 17, 18, 19, 20]);
Promise....
0
votes
1
answer
222
views
myRef.value is holding a Proxy even tho it should hold a simple array
I am doing a simple app that fetches data (my tasks) from my PocketBase(BaaS like Firebase).
I want to store my tasks into a ref because it could change overtime (ex: user modify the name of it).
I am ...
1
vote
1
answer
585
views
Vue: Check if the image was loaded and show a skeleton loader if not
I need to check if the image was loaded by the browser and if all data was fetched, then display a content, if not, show <ItemCardSkeleton /> component instead. So if one image is loaded faster ...
-1
votes
1
answer
460
views
Call async func without waiting for result (execute in background) [duplicate]
My Vue.js code:
function dreamOn() {
await web3.eth.sendSignedTransaction(txFin);
return;
}
I want to send this transaction, but I don't want to wait for the result of sendSignedTransaction (...
-1
votes
1
answer
835
views
VueJS and Axios causing 'error during execution of scheduler flush' and Uncaught (in promise) TypeError
So i have been poking my code for a while and found out that this error is caused specifically by this line of code:
treeNodes.value = documentStore.convertToTree((await axios.get('/File')).data);
...
0
votes
0
answers
123
views
API calls in beforeCreate
as in the beforecreate() lifecycle hook the data won't be accessible what is the purpose to make API calls in it (I came accross it in many cases)
here an example:
beforeCreate() {
this.$...
0
votes
0
answers
333
views
How to authenticate user with AWS Cognito in Vue.js using Javascript
I am facing the issue that I cannot fully undertsand how to call a function that uses a callback and get the results of the callback returned in a way where the data from the response becomes ...
1
vote
0
answers
41
views
Data return issues when using Promise.all to make sequencial calls to the same endpoint
When I try to use Promise.all to call the same internal endpoint multiple times the data returned from each promise in a order different every time.
For additional information:
These endpoints perform ...
2
votes
1
answer
186
views
VueJS method is undefined
In my vue project, i want to fetch something from graphql and store it to a variable.
function is async and the value of rawID must be awaited for. Since this could obviously also result in undefined, ...
0
votes
1
answer
1k
views
how to handle the async data in vue3
I have the deman to fetch the server data and then process before rendering the page.
here is the code in my index.vue, in option api:
<template>
<div>{{userData.name}}</div>// 💗'...
3
votes
1
answer
1k
views
How to load an async prop value inside a Vue "v-for" element?
I am using Vue with Firebase Firestore.
I have a list of people displayed using a v-for element. The list of people is of an unknown size. Data for the list comes from Firestore which arrives ...
1
vote
2
answers
174
views
VueJs + Axios + D3.js "Error: too late; already running"
I am trying to visualize some data with Vue-d3-charts.
I am getting the data asyncronously with axios.
The problem is that i am having issues with pushing the response data to the chart_data.
Either i ...
0
votes
2
answers
2k
views
Why is this error not letting me async render Vue Components?
I'm quite new with Vue, and I'm trying to lazy load a Component, I'm getting this error which I don't understand, there should probably be a syntax error.
Here's the code:
<template>
<div ...