` 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_",[2905,2906],{"name":2893,"color":2894},{"name":2880,"color":2881},26049,"useAsyncData is running twice refetching data (server and client)","2024-03-03T08:53:17Z","https://github.com/nuxt/nuxt/issues/26049",0.6273858,{"description":2913,"labels":2914,"number":2920,"owner":2869,"repository":2869,"state":2871,"title":2921,"updated_at":2922,"url":2923,"score":2924},"### Environment\n\n------------------------------\r\n- Operating System: Windows_NT\r\n- Node Version: v16.14.0\r\n- Nuxt Version: 3.5.0\r\n- Nitro Version: 2.4.0\r\n- Package Manager: pnpm@8.3.1\r\n- Builder: vite\r\n- User Config: vite\r\n- Runtime Modules: -\r\n- Build Modules: -\r\n------------------------------\r\n\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-btqy9q?file=server%2Fapi%2Ftemp.ts,app.vue\n\n### Describe the bug\n\nWhen useAsyncData with `immediate` option `false` and call later by `execute` or `refresh` method, it makes fetching data twice and `Hydration mismatch` if result of api call is different. I chekced `NuxtApp payload`, it has cached data, but it seems it doesn't use it. Is this intended behavior?\r\n\r\n\r\n\r\nI also have other [questions in discussions](https://github.com/nuxt/nuxt/discussions/20885). if possible, plz answer those too. Thanks!\r\n\r\n\r\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2915,2916,2919],{"name":2893,"color":2894},{"name":2917,"color":2918},"dx","C39D69",{"name":2866,"color":2896},20900,"useAsyncData with immediate false and call execute after makes fetching the data twice","2023-05-17T13:23:54Z","https://github.com/nuxt/nuxt/issues/20900",0.63096136,{"labels":2926,"number":2929,"owner":2869,"repository":2869,"state":2871,"title":2930,"updated_at":2931,"url":2932,"score":2933},[2927,2928],{"name":2893,"color":2894},{"name":2880,"color":2881},13460,"useAsyncData changed behaviour","2023-01-19T16:58:59Z","https://github.com/nuxt/nuxt/issues/13460",0.6324889,{"labels":2935,"number":2941,"owner":2869,"repository":2869,"state":2871,"title":2942,"updated_at":2943,"url":2944,"score":2945},[2936,2939,2940],{"name":2937,"color":2938},"enhancement","8DEF37",{"name":2893,"color":2894},{"name":2866,"color":2896},12835,"Allow using `useAsyncData` from Nuxt plugins","2023-01-19T16:36:14Z","https://github.com/nuxt/nuxt/issues/12835",0.6415678,{"description":2947,"labels":2948,"number":2951,"owner":2869,"repository":2869,"state":2871,"title":2952,"updated_at":2953,"url":2954,"score":2955},"### Describe the feature\n\nSometimes people are using `useAsyncData` for side-effects, like fetching the data and passing it to the store. Although this is not what was `useAsyncData` built for, but people still going to use it. And later they find that useAsyncData is called twice, because their side-effect callback returns nothing.\r\n\r\nI see 2 ways of resolving this problem:\r\n1. Create new hook in addition to `useAsyncData` and encourage people to use it\r\n2. Update the docs to display some warnings about side-effect usage and about return value\r\n3. Accept `undefined` as valid value (found: https://github.com/nuxt/nuxt/pull/23351)\r\n\r\nI prefer 2nd option, but want to have some thoughts about it\n\n### Additional information\n\n- [X] Would you be willing to help implement this feature?\n- [ ] Could this feature be implemented as a module?\n\n### Final checks\n\n- [X] Read the [contribution guide](https://nuxt.com/docs/community/contribution).\n- [X] Check existing [discussions](https://github.com/nuxt/nuxt/discussions) and [issues](https://github.com/nuxt/nuxt/issues).",[2949,2950],{"name":2893,"color":2894},{"name":2880,"color":2881},23388,"Docs: explicitly describe that `useAsyncData` callback must return a value ","2023-09-28T07:34:41Z","https://github.com/nuxt/nuxt/issues/23388",0.6418448,{"description":2957,"labels":2958,"number":2961,"owner":2869,"repository":2869,"state":2871,"title":2962,"updated_at":2963,"url":2964,"score":2965},"### Environment\n\n------------------------------\r\n- Operating System: Linux\r\n- Node Version: v18.20.3\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: npm@10.2.3\r\n- Builder: -\r\n- User Config: devtools\r\n- Runtime Modules: -\r\n- Build Modules: -\r\n------------------------------\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-5jqx3p?file=pages%2Findex.vue\r\n\r\nReload the index page and see that https://jsonplaceholder.typicode.com/posts is called again on client side although the data is present in the payload data.\n\n### Describe the bug\n\nWhen using useFetch or useAsyncData inside a component which is inserted into the DOM by a dynamic component, useFetch or useAsyncData won't use the data from the payload but calls the API endpoint again on client side which results in two calls to the REST API endpoint (SSR and Client). It should take the data from the payload instead of making another call on client side.\r\n\r\n\r\n\n\n### Additional context\n\nThis problem is crucial when working with Storyblok CMS as Storyblok mainly works with dynamic components.\n\n### Logs\n\n_No response_",[2959,2960],{"name":2893,"color":2894},{"name":2880,"color":2881},27439,"useFetch and useAsyncData loading twice (SSR & Client) when inside a dynamic loaded component","2024-06-20T11:09:41Z","https://github.com/nuxt/nuxt/issues/27439",0.6468903,{"labels":2967,"number":2973,"owner":2869,"repository":2869,"state":2871,"title":2974,"updated_at":2975,"url":2976,"score":2977},[2968,2969,2970],{"name":2893,"color":2894},{"name":2866,"color":2896},{"name":2971,"color":2972},"app","17512D",11068,"asyncData runs twice on client-side navigation","2023-01-19T14:46:58Z","https://github.com/nuxt/nuxt/issues/11068",0.6470739,["Reactive",2979],{},["Set"],["ShallowReactive",2982],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fTovPUfEW25qOgJ7A63ENpN3qiloBvtSJbycih-j_wH4":-1},"/nuxt/scripts/44"]