` with `\u003CNuxtPage />`\r\n3. create a file `pages/index.vue`\r\n4. create a useAsyncData call:\r\n\r\n```\r\nconst { data, error } = await useAsyncData('test', async () => {\r\n if (process.server) {\r\n console.log('Server: hi');\r\n } else if (process.client) {\r\n console.log('Client: hi');\r\n }\r\n const response = await $fetch('/api/test')\r\n});\r\n```\r\n\r\n5. create a file `server/api/test.get.ts` with this code:\r\n\r\n```\r\nexport default defineEventHandler(async event => {\r\n console.log('test.get.ts hit')\r\n});\r\n```\r\n\r\n6. `npm run dev` and each time you refresh the page, the console log in terminal will show \r\n\r\n```\r\nServer: hi\r\ntest.get.ts hit\r\ntest.get.ts hit\r\n```\r\n\r\nI've tested this on my main project with a api endpoint that adds a row to the database, and it is adding two rows every refresh. \r\n\r\nI think the problem is that useAsyncData is running the full function both on server and client. It should not be re-fetching the data on client.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2881,2884],{"name":2882,"color":2883},"3.x","29bc7f",{"name":2866,"color":2867},26049,"useAsyncData is running twice refetching data (server and client)","2024-03-03T08:53:17Z","https://github.com/nuxt/nuxt/issues/26049",0.6128962,{"labels":2891,"number":2894,"owner":2872,"repository":2872,"state":2873,"title":2895,"updated_at":2896,"url":2897,"score":2898},[2892,2893],{"name":2882,"color":2883},{"name":2866,"color":2867},13460,"useAsyncData changed behaviour","2023-01-19T16:58:59Z","https://github.com/nuxt/nuxt/issues/13460",0.61408716,{"description":2900,"labels":2901,"number":2905,"owner":2872,"repository":2906,"state":2873,"title":2907,"updated_at":2908,"url":2909,"score":2910},"When using `useAsyncData`, the http call is made on server and on client.",[2902],{"name":2903,"color":2904},"bug","ff281a",44,"nuxt.com","[Nuxt3] Async data called twice","2023-01-19T16:58:58Z","https://github.com/nuxt/nuxt.com/issues/44",0.6309803,{"description":2912,"labels":2913,"number":2905,"owner":2872,"repository":2917,"state":2873,"title":2918,"updated_at":2919,"url":2920,"score":2910},"- [x] [Crisp](https://crisp.chat/en/) - https://github.com/nuxt/scripts/pull/128\r\n- [x] [Intercom](https://www.intercom.com/) - https://github.com/nuxt/scripts/pull/129\r\n- [ ] [Messenger](https://www.facebook.com/business/goals/add-live-chat-to-website-with-messenger)\r\n\r\nSimilar to https://github.com/calibreapp/react-live-chat-loader",[2914],{"name":2915,"color":2916},"enhancement","a2eeef","scripts","Live Chat Integrations with Facade Components","2024-09-03T10:01:39Z","https://github.com/nuxt/scripts/issues/44",{"description":2922,"labels":2923,"number":2926,"owner":2872,"repository":2872,"state":2873,"title":2927,"updated_at":2928,"url":2929,"score":2930},"### Environment\n\n- Operating System: Windows_NT\r\n- Node Version: v21.1.0\r\n- Nuxt Version: 3.10.2\r\n- CLI Version: 3.10.1\r\n- Nitro Version: 2.8.1\r\n- Package Manager: npm@10.2.5\r\n- Builder: -\r\n- User Config: devtools\r\n- Runtime Modules: -\r\n- Build Modules: -\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-yjwcwx\n\n### Describe the bug\n\nWhen\r\n`useAsyncData` `key` is set to `defer`\r\n\r\nHaving the request on `App.vue` and the children causes it to make the request twice. I would expect this to be make the request once when the page is reloaded. I guess currently It doesn't dedupe the request correctly when it's on different levels even though the key is the same. Also the `refreshNuxtData` runs once as it should. But this behavior is different than what happens when you refresh the page.\r\n\r\nWhen\r\n`useAsyncData` `key` is set to `cancel`\r\n\r\nThis is the worst case scenario. Makes request for every `useAsyncData`. The same goes for `refreshNuxtData`. No dedupe at all.\r\n\r\n\r\n\r\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2924,2925],{"name":2882,"color":2883},{"name":2866,"color":2867},25853,"UseFetch / UseAsyncData Dedupe not Working","2024-06-20T11:09:06Z","https://github.com/nuxt/nuxt/issues/25853",0.63610196,{"description":2932,"labels":2933,"number":2936,"owner":2872,"repository":2872,"state":2873,"title":2937,"updated_at":2938,"url":2939,"score":2940},"### Environment\r\n\r\n- Operating System: Linux\r\n- Node Version: v20.11.1\r\n- Nuxt Version: 3.11.2\r\n- CLI Version: 3.11.1\r\n- Nitro Version: 2.9.6\r\n- Package Manager: yarn@1.22.19\r\n- Builder: -\r\n- User Config: devtools\r\n- Runtime Modules: -\r\n- Build Modules: -\r\n\r\n### Reproduction\r\n\r\nhttps://github.com/daniluk4000/nuxt-refresh-data-duplicate\r\n\r\n1. `yarn`\r\n2. `yarn dev`\r\n3. Go to index page\r\n4. Go to second page\r\n5. Go back to index page\r\n6. Watch second page async data to be repeated\r\n7. If you do that many times, you will find many duplicate repeates when coming back to first page\r\n\r\n### Describe the bug\r\n\r\nWhen you use useAsyncData on one page and navigate to another, and then try to use refreshNuxtData, all previous async datas are triggered even when page was already unmounted, which leads to falsey errors and/or duplicate requests.\r\n\r\n### Additional context\r\n\r\nI was like \"HAHA FOUND YA LENNY\" when I got the reason for this. We are facing weird issues in our project and I wasn't able to reproduce it on clear project until I finally got the reason for this.\r\n\r\n### Logs\r\n\r\n_No response_",[2934,2935],{"name":2882,"color":2883},{"name":2866,"color":2867},26820,"useAsyncData is not cleared when using defineNuxtComponent","2024-04-17T12:57:46Z","https://github.com/nuxt/nuxt/issues/26820",0.6388126,{"description":2942,"labels":2943,"number":2946,"owner":2872,"repository":2872,"state":2873,"title":2947,"updated_at":2948,"url":2949,"score":2950},"### Environment\n\n------------------------------\r\n- Operating System: Darwin\r\n- Node Version: v18.16.0\r\n- Nuxt Version: 3.6.2\r\n- Nitro Version: 2.5.2\r\n- Package Manager: pnpm@8.5.1\r\n- Builder: vite\r\n- User Config: ssr, pages, srcDir, routeRules, experimental, devtools, alias, typescript, css, app, modules, unocss, imports, components, vite\r\n- Runtime Modules: @pinia/nuxt@0.4.11, @vueuse/nuxt@10.2.1, @unocss/nuxt@0.53.4, @vue-macros/nuxt@1.3.12, nuxt-vitest@0.8.7\r\n- Build Modules: -\r\n------------------------------\n\n### Reproduction\n\n- Github repo : https://github.com/ChronicStone/repro-issue-nuxt-useAsyncData\r\n- Live version : https://repro-issue-nuxt-use-async-data.vercel.app/\n\n### Describe the bug\n\nSince upgrating to v3.6.2, useAsyncData has inconsistent & strange behaviour.\r\nI found two main strange behaviours : \r\n\r\n### SCENARIO 1 : \r\n\r\nHere the data load once, but then the function that resolves it never runs again, no matter how the watch dependencies change.\r\n\r\nAlso, if I have the following route : `/users/profile/:userId()`\r\nWhen first visiting the page, the data will be resolved correctly if it's not already populated. If I come back to the route with a different ID, it won't re-trigger the resolver at all. I need to do a full page reload to have it resolve the correct data.\r\n\r\n### SCENARIO 2 : \r\n\r\nThe data does not load at first, and stays empty. Then, if a dependency change, it will refresh correctly.\r\n\r\n----\r\n\r\nThe reproduction provided includes the 2nd scenario, I couldn't reproduce the 1st case on a minimal setup yet. An other interesting is that on both case, devtools is completely bugged on these two cases, hitting refresh there won't do anything. You can also observe this in the provided minimal reproduction\n\n### Additional context\n\nFirst here's the context on which i'm using it\r\n- `ssr: false` in config\r\n- I'm not awaiting the useAsyncData on my component\r\n\r\nHere's an example of how i'm using it in-app : \r\n\r\n```ts\r\nconst periodFilters = ref\u003C{ month: number; year: number }>({ month: 1, year: 1 });\r\n\r\nconst { data, pending } = useAsyncData(\r\n \"assessmentCountStats\",\r\n () => StatisticsController.getAssessmentStatusCount(props.clientId, periodFilters.value),\r\n { watch: [() => props.clientId, () => periodFilters.value.year, () => periodFilters.value.month] }\r\n);\r\n```\r\n\r\nAlso worth mentionning that if I switch back to 3.6.1, everything works fine, data always update according to dependency & load correctly.\n\n### Logs\n\n_No response_",[2944,2945],{"name":2882,"color":2883},{"name":2866,"color":2867},22027,"useAsyncData has inconsistent behaviour (ssr:false) since v3.6.2","2023-07-11T07:02:52Z","https://github.com/nuxt/nuxt/issues/22027",0.64053416,{"description":2952,"labels":2953,"number":2961,"owner":2872,"repository":2872,"state":2873,"title":2962,"updated_at":2963,"url":2964,"score":2965},"### Environment\r\n\r\n------------------------------\r\n- Operating System: Linux\r\n- Node Version: v18.16.1\r\n- Nuxt Version: 3.6.1\r\n- Nitro Version: 2.5.2\r\n- Package Manager: yarn@1.22.19\r\n- Builder: vite\r\n- User Config: runtimeConfig, alias, css, components, vite, dir, plugins, modules, pwa\r\n- Runtime Modules: nuxt-jsonld@2.0.8, @vite-pwa/nuxt@0.1.0, @pinia/nuxt@0.4.11, @nuxtjs/eslint-module@4.1.0\r\n- Build Modules: -\r\n------------------------------\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/github-tex5o8?file=pages%2Findex.vue\r\n\r\n### Describe the bug\r\n\r\nI've checked docs and as I see `useAsyncData` should cache data for response with same key.\r\n\r\nSo for example:\r\n```\r\nconst KEY = 'test';\r\nconst { data: data } = await useAsyncData(KEY, async () => {\r\n console.log('test');\r\n return {};\r\n});\r\nconst { data: data2 } = await useAsyncData(KEY, async () => {\r\n console.log('test');\r\n return {};\r\n});\r\nconst { data: data3 } = await useAsyncData(KEY, async () => {\r\n console.log('test');\r\n return {};\r\n});\r\n```\r\n\r\nThis should show only once `'test'` in console, but it shows it three times.\r\n\r\nIn real world app I need to fetch data in component A and then use same data in page B.\r\nRight now the only option that I see is to make two api calls.\r\n\r\nIn nuxt 2, I've used `fetch` component option method to make call in component A and I didn't even need to make call in page B, because I've already had data in vuex (from component A). How to handle that (without duplicated requests) if `useAsyncData` doesn't provide cache?\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[2954,2957,2960],{"name":2955,"color":2956},"documentation","5319e7",{"name":2958,"color":2959},"good first issue","fbca04",{"name":2882,"color":2883},22622,"Clarify that `useAsyncData` results are not cached","2023-12-14T11:09:24Z","https://github.com/nuxt/nuxt/issues/22622",0.6414195,{"labels":2967,"number":2970,"owner":2872,"repository":2872,"state":2873,"title":2971,"updated_at":2972,"url":2973,"score":2974},[2968,2969],{"name":2882,"color":2883},{"name":2866,"color":2867},14229,"When two useAsyncData with same key refresh at same time, only one of them updates.","2023-01-19T17:30:53Z","https://github.com/nuxt/nuxt/issues/14229",0.6450102,["Reactive",2976],{},["Set"],["ShallowReactive",2979],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fayAtMTg4QZa-_UAxPpXth2nUpMYlHt5MhIxK8km7aFw":-1},"/nuxt/nuxt/12690"]