useFetch and useLazyFetch are custom hooks that can be used in Nuxt.js version 3 to make API calls.
useFetch can be used to fetch data during the server-side rendering (SSR) process. It will return the data immediately if it is already available, otherwise it will wait for the data to be fetched before rendering the page.
useLazyFetch is similar to useFetch, but it is used to fetch data during the client-side rendering (CSR) process. It will only fetch the data when the component is mounted and will not block the rendering of the page.
Top comments (0)