A Brief Overview of Other Nuxt useFetch Configuration Options
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
- keepsuseFetch
from immediately making the request, meaning you’ll have to callexecute
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 requests
All 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