\r\n\u003C/template>\r\n\r\n\u003Cscript setup lang=\"ts\">\r\nconst { data, error, pending, status, refresh } = useFetch(\r\n \"https://jsonplaceholder.typicode.com/todos/1\",\r\n { immediate: false }\r\n);\r\n\u003C/script>\r\n```\r\n\r\n...you will notice that \"pending\" will remain **true** until the request is triggered at least once.\r\n\r\n### Describe the bug\r\n\r\nMaybe it is by design, but I have the feeling pending should stay **false** while not fetching, even in not immediate mode.\r\nA workaround is to use \"status === pending\" in template loaders, but I feel it less straightforward than \"pending\".\r\n\r\n### Additional context\r\n\r\nI hope my English is understandable, and thank you for your amazing work.\r\n\r\n### Logs\r\n\r\n_No response_",[2865,2868],{"name":2866,"color":2867},"3.x","29bc7f",{"name":2869,"color":2870},"pending triage","E99695",23562,"nuxt","closed","useAsyncData with { immediate: false } returns pending = \"true\" until fired at least once.","2023-10-07T11:05:38Z","https://github.com/nuxt/nuxt/issues/23562",0.58818907,{"description":2879,"labels":2880,"number":2883,"owner":2872,"repository":2872,"state":2873,"title":2884,"updated_at":2885,"url":2886,"score":2887},"### Environment\n\n- Operating System: `Linux`\r\n- Node Version: `v16.17.1`\r\n- Nuxt Version: `3.2.2`\r\n- Nitro Version: `2.2.2`\r\n- Package Manager: `npm@8.15.0`\r\n- Builder: `vite`\r\n- User Config: `runtimeConfig`, `modules`, `css`, `app`, `experimental`, `imports`, `nitro`, `typescript`\r\n- Runtime Modules: `@pinia/nuxt@0.4.7`, `@nuxtjs/tailwindcss@6.4.1`\r\n- Build Modules: \n\n### Reproduction\n\n\r\n```\r\n// before refresh call asyncData a pending must be false\r\nconst { pending: isLoadingOne, refresh: fetchOne } = useFetch('https://jsonplaceholder.typicode.com/todos/1', { immediate: false });\r\n\r\n// before refresh call asyncData a pending must be false | perhaps a controversial case\r\nconst { pending: isLoadingTwo, refresh: fetchTwo } = await useFetch('https://jsonplaceholder.typicode.com/todos/2', { immediate: false });\r\n```\r\n\r\nSee full code: https://stackblitz.com/edit/nuxt-starter-9uxzmd?file=app.vue\n\n### Describe the bug\n\nUntil the request is forcibly invoked, it is assumed that the waiting status should be false.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2881,2882],{"name":2866,"color":2867},{"name":2869,"color":2870},19218,"`useFetch/useAsyncData`: BUG: when `immediate: false`, then `pending` is `true` before call `execute/refresh` (must to be false)","2023-12-20T16:49:10Z","https://github.com/nuxt/nuxt/issues/19218",0.6015019,{"description":2889,"labels":2890,"number":2895,"owner":2872,"repository":2872,"state":2873,"title":2896,"updated_at":2897,"url":2898,"score":2899},"### Environment\n\n------------------------------\r\n- Operating System: `Linux`\r\n- Node Version: `v16.14.2`\r\n- Nuxt Version: `3.0.0`\r\n- Nitro Version: `1.0.0`\r\n- Package Manager: `npm@7.17.0`\r\n- Builder: `vite`\r\n- User Config: `-`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n------------------------------\n\n### Reproduction\n\nhttps://stackblitz.com/edit/nuxt-starter-qorbrt?file=app.vue\r\n\r\nOpen DevTool, `\u003CNuxtWelcome />` not render at server side.\n\n### Describe the bug\n\nWhen we use `useAsyncData()` and set `server: false`. the return value `pending` will get `true` at server side. It should be `false`? because this will not invoke at server side.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2891,2894],{"name":2892,"color":2893},"discussion","538de2",{"name":2866,"color":2867},15714,"`useAsyncData` return value that `pending` is `true` at server side when `server: false`","2023-02-08T02:39:02Z","https://github.com/nuxt/nuxt/issues/15714",0.6155994,{"description":2901,"labels":2902,"number":2905,"owner":2872,"repository":2872,"state":2873,"title":2906,"updated_at":2907,"url":2908,"score":2909},"### Environment\n\n------------------------------\r\n- Operating System: Darwin\r\n- Node Version: v18.15.0\r\n- Nuxt Version: 3.5.3\r\n- Nitro Version: 2.4.1\r\n- Package Manager: npm@9.5.0\r\n- Builder: vite\r\n- User Config: app, vite, modules, css, typescript, postcss, runtimeConfig, viewport, image\r\n- Runtime Modules: @pinia/nuxt@0.4.11, @vueuse/nuxt@9.13.0, @nuxt/image-edge@1.0.0-28099902.2b6ed1c, nuxt-viewport@2.0.4, nuxt-typed-router@3.2.2, @nuxtjs/google-fonts@3.0.1\r\n- Build Modules: -\r\n------------------------------\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-sbu2zi?file=pages%2Ftest.vue\n\n### Describe the bug\n\nWhen the `immediate` option is set to false on the `useFetch` composable. The `pending` value return true on initial load till the function has been executed. \r\n\r\nThe ideal behavior would be the `pending` value would be false by default when `immediate` option is set to false. \n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2903,2904],{"name":2866,"color":2867},{"name":2869,"color":2870},21581,"useFetch pending true by default when immediate set to false","2023-06-15T16:16:09Z","https://github.com/nuxt/nuxt/issues/21581",0.6289927,{"description":2911,"labels":2912,"number":2915,"owner":2872,"repository":2872,"state":2873,"title":2916,"updated_at":2917,"url":2918,"score":2919},"### 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_",[2913,2914],{"name":2866,"color":2867},{"name":2869,"color":2870},22027,"useAsyncData has inconsistent behaviour (ssr:false) since v3.6.2","2023-07-11T07:02:52Z","https://github.com/nuxt/nuxt/issues/22027",0.6320539,{"labels":2921,"number":2924,"owner":2872,"repository":2872,"state":2873,"title":2925,"updated_at":2926,"url":2927,"score":2928},[2922,2923],{"name":2866,"color":2867},{"name":2869,"color":2870},14025,"useAsyncData still returning \"pending\" true when network tab shows completed","2023-01-19T17:27:45Z","https://github.com/nuxt/nuxt/issues/14025",0.6457305,{"labels":2930,"number":2933,"owner":2872,"repository":2872,"state":2873,"title":2934,"updated_at":2935,"url":2936,"score":2937},[2931,2932],{"name":2866,"color":2867},{"name":2869,"color":2870},13633,"useAsyncData does not update data after first load","2023-01-19T17:02:42Z","https://github.com/nuxt/nuxt/issues/13633",0.6464675,{"description":2939,"labels":2940,"number":2946,"owner":2872,"repository":2872,"state":2873,"title":2947,"updated_at":2948,"url":2949,"score":2950},"### Environment\r\n\r\n------------------------------\r\n- Operating System: Darwin\r\n- Node Version: v16.19.0\r\n- Nuxt Version: 3.5.0\r\n- Nitro Version: 2.4.1\r\n- Package Manager: yarn@3.5.0\r\n- Builder: vite\r\n- User Config: app, css, ssr, modules, htmlValidator, runtimeConfig, alias, build, vite\r\n- Runtime Modules: @vueuse/nuxt@10.2.1, @pinia/nuxt@^0.4.10, @nuxtjs/html-validator@^1.2.4, nuxt-swiper@^1.1.0\r\n- Build Modules: -\r\n------------------------------\r\n\r\n### Reproduction\r\n\r\nhttps://github.com/devops3199/nuxt3-issue-example\r\n\r\n### Describe the bug\r\n\r\nThe issue occurs during SSR.\r\n\r\nI'm trying to fetch second data based on a value from the first fetched data. From the below scenario, only the first fetch triggers then render html.\r\n\r\n```\r\n// src/app.vue\r\n\r\n\u003Ctemplate>\r\n code...\r\n\u003C/template>\r\n\u003Cscript setup>\r\nconst {data} = await useAsyncData('items', async () => {\r\n let details;\r\n const {data} = await $fetch(...);\r\n \r\n if (data.isCondition) {\r\n // although isCondition value is true, does not trigger\r\n details = await $fetch(...);\r\n }\r\n \r\n return {data, details};\r\n})\r\n\u003C/script>\r\n```\r\n\r\nI can use `Promise.all` to solve this issue, but I am not sure whether this is the expected behaviour from `useAsyncData`. \r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[2941,2942,2943],{"name":2866,"color":2867},{"name":2869,"color":2870},{"name":2944,"color":2945},"needs reproduction","FBCA04",22263,"Allowing more than a single fetch in useAsyncData","2023-07-23T23:24:25Z","https://github.com/nuxt/nuxt/issues/22263",0.65271425,{"description":2952,"labels":2953,"number":2958,"owner":2872,"repository":2872,"state":2873,"title":2959,"updated_at":2960,"url":2961,"score":2962},"### Environment\n\n------------------------------\n- Operating System: Linux\n- Node Version: v20.19.1\n- Nuxt Version: 3.17.3\n- CLI Version: 3.25.1\n- Nitro Version: 2.11.12\n- Package Manager: npm@10.8.2\n- Builder: -\n- User Config: ssr, compatibilityDate, devtools\n- Runtime Modules: -\n- Build Modules: -\n------------------------------\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-1bxtmpqb-alwyug2t\n\nFollow these steps:\n- Navigate to `/`\n- Click Go to Same key to go to `/same-key`\n- The status then does not change to `success`\n\n### Describe the bug\n\nWhen using useAsyncData with the same key, the status does not change between page navigations.\nIn Nuxt 3.16, the status does change.\n\nIt might not be recommended to update reactive values defined outside within the asyncData handler, though…\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\n\n```",[2954,2955],{"name":2869,"color":2870},{"name":2956,"color":2957},"possible regression","B90A42",32158,"When using useAsyncData with the same key, the status does not change between page navigations.","2025-05-20T01:01:36Z","https://github.com/nuxt/nuxt/issues/32158",0.6594843,{"description":2964,"labels":2965,"number":2968,"owner":2872,"repository":2872,"state":2873,"title":2969,"updated_at":2970,"url":2971,"score":2972},"### Environment\n\n\r\n------------------------------\r\n- Operating System: Darwin\r\n- Node Version: v18.16.0\r\n- Nuxt Version: 3.5.3\r\n- Nitro Version: 2.4.1\r\n- Package Manager: yarn@1.22.19\r\n- Builder: vite\r\n- User Config: app, components, runtimeConfig, modules, pinia, vite, css, alias, experimental\r\n- Runtime Modules: @pinia/nuxt@0.4.11, nuxt-icon@0.4.2\r\n- Build Modules: -\r\n------------------------------\n\n### Reproduction\n\n```\r\nonMounted(async () => {\r\n\tif (process.client) {\r\n\t\tconst { data } = await useFetch('http://192.168.0.134:9900/api/order/quotationbar/queryQuotationBarNumber', {\r\n\t\t\tmethod: 'post',\r\n\t\t\theaders: {\r\n\t\t\t\tAuthorization: 'bearer b70d7091-aa41-4857-9eec-1b1ef336043f',\r\n\t\t\t},\r\n\t\t\tserver: false,\r\n\t\t\tlazy: true,\r\n\t\t})\r\n\t\tconsole.log(data)\r\n\t}\r\n})\r\n```\r\n\r\ndata为null\n\n### Describe the bug\n\n客户端渲染获取到data为null\r\n\r\n\r\n\n\n### Additional context\n\n做了以下尝试\r\n\r\nonMounted请求\r\n判断process.client\r\n修改useFetch配置为server为false\r\nlazy为true\r\n\r\n都获取不到数据\r\n\r\n在浏览器的network是可以看到请求成功的~\n\n### Logs\n\n_No response_",[2966,2967],{"name":2866,"color":2867},{"name":2869,"color":2870},22103,"useFetch客户端渲染 data返回为null","2025-01-11T06:07:52Z","https://github.com/nuxt/nuxt/issues/22103",0.66019183,["Reactive",2974],{},["Set"],["ShallowReactive",2977],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fxPydD-zH1yMXm_43zjvFmbtbt2Up5FpaveXQdAv38dw":-1},"/nuxt/nuxt/19189"]