\n\u003C/template>\n\n\u003Cscript setup>\n\tconst keyword = ref('');\n\n\twatchEffect(() => {\n\t\tconsole.log('馃殌 ~ watchEffect ~ keyword.value:', keyword.value);\n\t});\n\u003C/script>\n```\n\n\n\n```vue\n\u003Ctemplate>\n\t\u003CUInput v-model=\"keyword\" />\n\u003C/template>\n\n\u003Cscript setup>\n\tconst keyword = ref('');\n\n\twatchEffect(() => {\n\t\tconsole.log('馃殌 ~ watchEffect ~ keyword.value:', keyword.value);\n\t});\n\u003C/script>\n```\n\n### Logs\n\n```shell-script\n\n```",[1984,1987],{"name":1985,"color":1986},"bug","d73a4a",{"name":1988,"color":1989},"triage","ffffff",2713,"nuxt","ui","open","UInput Component Lacks Proper Handling of compositionstart and compositionend","2024-11-21T06:40:46Z","https://github.com/nuxt/ui/issues/2713",0.6779208,{"description":1999,"labels":2000,"number":2010,"owner":1991,"repository":1991,"state":1993,"title":2011,"updated_at":2012,"url":2013,"score":2014},"> [!NOTE]\n> I have since noticed that this is an issue for many of the types provided, not just default. For example, following the docs does not allow your custom wrapper to use a function for the URL parameter.\n\n### Environment\n\nWorking directory: /home/projects/nuxt-starter-r4dshc\nNuxt project info:\n\n------------------------------\n- Operating System: Linux\n- Node Version: v18.20.3\n- Nuxt Version: 3.14.159\n- CLI Version: 3.15.0\n- Nitro Version: 2.10.4\n- Package Manager: npm@10.2.3\n- Builder: -\n- User Config: default\n- Runtime Modules: -\n- Build Modules: -\n------------------------------\n\n### Reproduction\n\nhttps://stackblitz.com/edit/nuxt-starter-r4dshc?file=composables%2Ftest.ts&view=editor\n\nThe issue is in the `composables/test.ts` file, and appears as an error on the `default` property.\n\n### Describe the bug\n\nWhen creating a custom wrapper for `useFetch` as [described in the documentation](https://nuxt.com/docs/guide/recipes/custom-usefetch#custom-usefetchuseasyncdata), the `default` option of `UseFetchOptions` is always `() => Ref\u003Cnull, null> | null`, no matter what the type passed to `UseFetchOptions` is.\n\n### Additional context\n\nAs far as I can tell from looking through the type definitions, only the main `ResT` type is passed to the `UseFetchOptions` type:\n\n\nThe type used for the `default` option function comes from `DefaultT` on `UseFetchOptions`:\n\n\n\nWhen using `useFetch` normally, `DefaultT` is set to the same type as `ResT`, but when using the custom wapper, `DefaultT` instead uses its default type of `DefaultAsyncDataValue`, which is `null`.\n\nThis is solvable by copying the types defined by `useFetch` and passed to `UseFetchOptions`, but this is not a realistic option because it requires a significant amount of boilerplate typing for the wrapper function.\n\n### Logs\n\n```shell-script\n\n```",[2001,2004,2007],{"name":2002,"color":2003},"documentation","5319e7",{"name":2005,"color":2006},"types","2875C3",{"name":2008,"color":2009},"馃嵃 p2-nice-to-have","0E8A16",29970,"Custom `useFetch` has incorrect type for `default` option","2024-11-27T03:01:06Z","https://github.com/nuxt/nuxt/issues/29970",0.68688154,{"description":2016,"labels":2017,"number":2021,"owner":1991,"repository":1991,"state":1993,"title":2022,"updated_at":2023,"url":2024,"score":2025},"### Environment\n\n```\r\n------------------------------\r\n- Operating System: Linux\r\n- Node Version: v18.20.3\r\n- Nuxt Version: 3.12.4\r\n- CLI Version: 3.12.0\r\n- Nitro Version: 2.9.7\r\n- Package Manager: npm@10.2.3\r\n- Builder: -\r\n- User Config: compatibilityDate, devtools\r\n- Runtime Modules: -\r\n- Build Modules: -\r\n------------------------------\r\n```\n\n### Reproduction\n\nhttps://stackblitz.com/edit/nuxt-starter-rt2zig?file=pages%2Findex.vue\r\n\n\n### Describe the bug\n\nOn Page Load `Response` is null. But when changing something in code to trigger client refresh (i provided the console.log to trigger update), Response is given. \r\nIt works on page reload when using the doSuccess with another composable method.\r\n\r\nWhile debugging, it seems like that causes it:\r\n\r\nIn the described behaviour asyncData use `_nuxtOnBeforeMountCbs` to process the initialFetch\r\n\r\nhttps://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/app/composables/asyncData.ts#L372\r\n\r\nBut, what seems to be a bug, the line ([395](https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/app/composables/asyncData.ts#L395)) resolves in the given case the Promise where it isn麓t processed ([359](https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/app/composables/asyncData.ts#L359)) yet.\r\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2018],{"name":2019,"color":2020},"pending triage","E99695",28485,"useFetch returns null used in component when on parent data is loaded via composable useFetch on route watch","2024-08-13T09:19:21Z","https://github.com/nuxt/nuxt/issues/28485",0.6884813,{"description":2027,"labels":2028,"number":2039,"owner":1991,"repository":1991,"state":1993,"title":2040,"updated_at":2041,"url":2042,"score":2043},"### Describe the feature\r\n\r\nThe current behavior of `default` is inconsistent with other composables such as `useFetch`, `useAsyncData` and `useState`:\r\n1. `default` value is used only on init.\r\n2. `default` value is set to cookies in SSR, but not in CSR (https://github.com/nuxt/nuxt/issues/26701).\r\n\r\nProposals (breaking):\r\n1. The default value must be used even if the value is later set to `null` or `undefined`:\r\n```ts\r\nconst foo = useCookie('foo', { default: () => 'Stark' })\r\nfoo.value // -> 'Stark'\r\nfoo.value = 'Hulk'\r\nfoo.value // -> 'Hulk'\r\nfoo.value = undefined\r\nfoo.value // -> 'Stark' because it is default\r\n```\r\nJust as it is done for `useFetch` - if the `data` is undefined or it is an error, default value is used.\r\nAlso, good examples are [Vue prop default value](https://vuejs.org/guide/components/props.html#prop-validation) and https://vueuse.org/shared/refDefault.\r\n\r\n2. or rename `default` to `init` to match `useState` where default data is only used once during initialization.\r\n\r\nIn all cases default value should not be set to cookies on init.\r\n\r\n### Additional information\r\n\r\n- [X] Would you be willing to help implement this feature?\r\n- [ ] Could this feature be implemented as a module?\r\n\r\n### Final checks\r\n\r\n- [X] Read the [contribution guide](https://nuxt.com/docs/community/contribution).\r\n- [X] Check existing [discussions](https://github.com/nuxt/nuxt/discussions) and [issues](https://github.com/nuxt/nuxt/issues).",[2029,2032,2033,2036],{"name":2030,"color":2031},"discussion","538de2",{"name":1985,"color":1986},{"name":2034,"color":2035},"馃敤 p3-minor","FBCA04",{"name":2037,"color":2038},"4.x","3B01A5",26760,"Change behavior of `default` in `useCookie` to be consistent with other composables","2024-04-23T11:33:41Z","https://github.com/nuxt/nuxt/issues/26760",0.6998439,{"description":2045,"labels":2046,"number":2052,"owner":1991,"repository":1991,"state":2053,"title":2054,"updated_at":2055,"url":2056,"score":2057},"### Environment\n\n```\n- Operating System: Linux\n- Node Version: v18.20.3\n- Nuxt Version: 3.15.0\n- CLI Version: 3.17.2\n- Nitro Version: 2.10.4\n- Package Manager: npm@10.2.3\n- Builder: -\n- User Config: default\n- Runtime Modules: -\n- Build Modules: -\n```\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-mg1abp6d?file=app.vue\n\n### Describe the bug\n\nIn the Nuxt `v3.15` `compatibilityVersion: 4` doesn't change `data` type to `undefined` returned by `useFetch` as described in the [documentation](https://nuxt.com/docs/getting-started/upgrade#respect-defaults-when-clearing-data-in-useasyncdata-and-usefetch). It's `null`.\n\nIt works in `v3.14` as expected.\n\n```\n ERROR(vue-tsc) 'data.value' is possibly 'null'.\n FILE app.vue:10:12\n\n 8 | const dataValue = computed(() => {\n 9 | if (data.value !== undefined) {\n > 10 | return data.value.woof;\n | ^^^^^^^^^^\n 11 | }\n 12 | });\n 13 | \u003C/script>\n```",[2047,2048,2049],{"name":2005,"color":2006},{"name":2019,"color":2020},{"name":2050,"color":2051},"possible regression","B90A42",30369,"closed","`compatibilityVersion 4` doesn't change `useFetch` return data types","2024-12-27T21:33:08Z","https://github.com/nuxt/nuxt/issues/30369",0.6778044,{"labels":2059,"number":2070,"owner":1991,"repository":1991,"state":2053,"title":2071,"updated_at":2072,"url":2073,"score":2074},[2060,2063,2064,2067],{"name":2061,"color":2062},"3.x","29bc7f",{"name":1985,"color":1986},{"name":2065,"color":2066},"app","17512D",{"name":2068,"color":2069},"upstream","E8A36D",13790,"When build app useFetch with transform option will return data with value null on client side","2023-01-19T17:06:47Z","https://github.com/nuxt/nuxt/issues/13790",0.682806,{"labels":2076,"number":2081,"owner":1991,"repository":1991,"state":2053,"title":2082,"updated_at":2083,"url":2084,"score":2085},[2077,2078,2079,2080],{"name":2002,"color":2003},{"name":2061,"color":2062},{"name":1985,"color":1986},{"name":2034,"color":2035},13583,"`useFetch` data return null with mismatching client/request options","2024-09-12T17:23:04Z","https://github.com/nuxt/nuxt/issues/13583",0.68521214,{"description":2087,"labels":2088,"number":2089,"owner":1991,"repository":2090,"state":2053,"title":2091,"updated_at":2092,"url":2093,"score":2094},"in [module testing docs](https://test-utils.nuxtjs.org/api-reference/module-testing) page It only shows the following options:\r\n- `addPlugin`\r\n- `addLayout` \r\n- `addErrorLayout`\r\n- `addServerMiddleware` \r\n- `requireModule`\r\n\r\nBut the `addModule` option is not documented although it can be used!",[],449,"test-utils","Module testing page is missing the \"addModule\" option","2023-12-02T00:13:11Z","https://github.com/nuxt/test-utils/issues/449",0.6865088,{"description":2096,"labels":2097,"number":2102,"owner":1991,"repository":1991,"state":2053,"title":2103,"updated_at":2104,"url":2105,"score":2106},"### Environment\n\n------------------------------\r\n- Operating System: Linux\r\n- Node Version: v20.14.0\r\n- Nuxt Version: 3.12.1\r\n- CLI Version: 3.12.0\r\n- Nitro Version: 2.9.6\r\n- Package Manager: pnpm@9.1.4\r\n- Builder: -\r\n- User Config: ssr, future, components, css, typescript, modules, devtools, eslint, image, i18n, veeValidate\r\n- Runtime Modules: nuxt-icon@0.6.10, @nuxt/eslint@0.3.13, @nuxt/image@1.7.0, @nuxtjs/i18n@8.3.1, @pinia/nuxt@0.5.1, @vee-validate/nuxt@4.12.7\r\n- Build Modules: -\r\n------------------------------\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-69djhq?file=app%2Fapp.vue\n\n### Describe the bug\n\nIf you check out the reproduction and run `nuxt typecheck` you'll see that\r\n```ts\r\nconst { data } = useFetch(\"/api/foo\")\r\nconst foo: string | undefined = data.value\r\n```\r\nreturns an error because the type of `data` still is `unknown | null` instead of corresponding to v4's new `undefined` return type\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2098,2099,2100,2101],{"name":2005,"color":2006},{"name":2061,"color":2062},{"name":1985,"color":1986},{"name":2034,"color":2035},27565,"useAsyncData's return type for data and error still is `| null` in v4","2024-06-12T16:32:54Z","https://github.com/nuxt/nuxt/issues/27565",0.69085336,{"description":2108,"labels":2109,"number":2117,"owner":1991,"repository":1991,"state":2053,"title":2118,"updated_at":2119,"url":2120,"score":2121},"### Environment\n\n- Operating System: Darwin\n- Node Version: v22.11.0\n- Nuxt Version: 3.15.4\n- CLI Version: 3.21.1\n- Nitro Version: 2.10.4\n- Package Manager: pnpm@9.15.4\n- Builder: -\n- User Config: extends, modules, devtools, app, runtimeConfig, future, compatibilityDate, telemetry, eslint\n- Runtime Modules: @nuxt/ui@2.21.0, @nuxt/eslint@1.1.0, @vueuse/nuxt@12.7.0, @nuxt/image@1.9.0\n- Build Modules: -\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-fj7smbt7?file=app.vue\n\n### Describe the bug\n\nHi,\n\nWhen a `useFetch` is used in a Nuxt middleware and it returns `undefined` - the wrong `warn` is given:\n\n````\n WARN [nuxt] useAsyncData must return a value (it should not be undefined) or the request may be duplicated on the client side.\n````\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\n\n```",[2110,2113,2116],{"name":2111,"color":2112},"good first issue","fbca04",{"name":2114,"color":2115},"dx","C39D69",{"name":2008,"color":2009},31211,"`useFetch` in middleware that returns `undefined` gives `useAsyncData` warning","2025-03-07T11:12:28Z","https://github.com/nuxt/nuxt/issues/31211",0.6928845,["Reactive",2123],{},["Set"],["ShallowReactive",2126],{"TRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"AWEP5yx5B2falbJ7bgyZgrzrEBkNuOEK48-_o6Alx6U":-1},"/nuxt/ui/2441"]