Skip to content
Advertisement

Tag: axios

Currency Converter function in Vue3

I’m trying to implement a convert() function in a Vue3 project. I have a functions.js file to store some “global” basic functions I’m calling the function inside a component like this But it doesn’t work properly, I only get a pending Promise result… Can anybody tell me what I’m doing wrong? I’m learning Vue and JS…. Answer There is two

How to render something that is async in React?

I’m making a react app that works with a API that provides data to my App. In my data base I have data about pins on a map. I want to show the info of those pins on my react app, I want them to render. I get that information with axios and this url: http://warm-hamlet-63390.herokuapp.com/pin/list I want to retrieve

Cloudflare workers CORS ignored

I created a SendGrid form using CF Workers and set (for testing) Access-Control-Allow-Origin”, ‘*’ but it’s being ignored on the frontend: Do I need to also add it to the AXIOS POST request? Here’s code from my workers file: And here’s the AXIOS request: It all works fine using Insomnia and the headers are visible there: Answer You’ve correctly set

React-Query useQuery is caching response

I have following code This function should be called when I visit my main page, but when returning to this route from another page this request is not triggered and I don’t get fresh data. What I want is this query to be called every time like useEffect Answer data from the cache is always returned if there is data

Advertisement