#Nuxt 3 Double Fetching of Data After Upgrading from 3.5.3 -> 3.6.1

1 messages · Page 1 of 1 (latest)

shrewd sable
#

Hello,

I use the useAsyncData function to cache data on server side request so they are not fetched again on the client.

However, for some reason the data is being fetched twice. This did not happen prior to upgrading.

const [{ data: searchProjects, refresh: updateSearchProjects }, { data: notifications }] =
  await Promise.all([
    useAsyncData(
      'demoSearchProjects',
      () => useBaseFetch(`search?limit=3&query=${searchQuery.value}&index=${sortType.value}`),
      {
        transform: (result) => result.hits,
      }
    ),
    useAsyncData('updatedProjects', () => useBaseFetch(`search?limit=3&query=&index=updated`), {
      transform: (result) => result.hits,
    }),
  ])```

This is my code. Is there anything which could cause this?