[Vuejs]-Argument of type 'Ref<string>' is not assignable to parameter of type 'RequestInfo' when using fetch

2👍

Vue refs have a value property to access the current value of the ref, and fetch (one of its overloads) takes a string (the URL), so you just need to use:

const res = await fetch(keysUrl.value);

Source: https://vuejs.org/api/reactivity-core.html#ref

👤kelsny

Leave a comment