In this lesson, we quickly go over the rest of the useFetch
options available that we have not covered in the course so far.
server:false
- makes the request ONLY on the client side (even on page load)immediate: false
- keeps useFetch
from immediately making the request, meaning you’ll have to call execute
yourselfdefault
- sets the default value of the data for when the actual response data isn’t availablededupe
- allows you to configure how to handle overlapping or duplicated requestsAll of these options are available for useFetch
and useAsyncData
.
useFetch
has a few more that are essentially passed on to the underlying $fetch
function (like method
, baseURL
, and headers
.
Links