\n \u003C/template>\n \u003C/UAccordion>\n\u003C/template>\n```\n\ndid i miss something?\n\n### Additional context\n\n_No response_",[1984,1987],{"name":1985,"color":1986},"enhancement","a2eeef",{"name":1988,"color":1989},"triage","ffffff",3868,"nuxt","ui","open","Allow assigning IDs to Nuxt UI Tab panels for scroll targeting","2025-04-12T08:35:52Z","https://github.com/nuxt/ui/issues/3868",0.69497705,{"description":1999,"labels":2000,"number":2006,"owner":1991,"repository":1991,"state":1993,"title":2007,"updated_at":2008,"url":2009,"score":2010},"### Describe the feature\n\nGive more control over caching with fetching strategies/policies:\r\n\r\n```js\r\nuseFetch('/api/foo', {\r\n fetchPolicy: 'cache-first',\r\n})\r\n```\r\n\r\n- `cache-first`: if present in cache, return without requesting, otherwise request then update the cache.\r\n- `cache-and-network` : if present in cache, return. In any case, request in the background then update the cache.\r\n- `network-only`: request and wait response to return, then update the cache.\r\n- `cache-only`: only return from cache, don't request.\r\n- `no-cache`: request and wait response to return, don't update the cache.\r\n- `standby`: same as `cache-first` but don't refresh if path/parameter changes.\r\n\n\n### Additional information\n\n- [ ] 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).",[2001,2003],{"name":1985,"color":2002},"8DEF37",{"name":2004,"color":2005},"🍰 p2-nice-to-have","0E8A16",26017,"useFetch fetchPolicy","2024-12-20T00:46:25Z","https://github.com/nuxt/nuxt/issues/26017",0.698373,{"description":2012,"labels":2013,"number":2017,"owner":1991,"repository":1991,"state":1993,"title":2018,"updated_at":2019,"url":2020,"score":2021},"### Environment\r\n\r\n- Operating System: Darwin\r\n- Node Version: v20.11.0\r\n- Nuxt Version: 3.12.3\r\n- CLI Version: 3.12.0\r\n- Nitro Version: 2.9.7\r\n- Package Manager: bun@1.1.18\r\n- Builder: -\r\n- User Config: compatibilityDate, devtools\r\n- Runtime Modules: \r\n- Build Modules: -\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/nuxt-starter-zckkxt\r\n\r\n### Describe the bug\r\n\r\nIf you use `useFetch` with the same target url in multiple components, the application will fetch this multiple times.\r\n\r\ne.g. `useFetch('/api/random')`\r\n\r\nEven if the docs describe another behavior \r\n\r\n**From docs:**\r\n\r\nAbout Keys\r\n\r\n> [useFetch](https://nuxt.com/docs/api/composables/use-fetch) uses the provided URL as a key. Alternatively, a key value can be provided in the options object passed as a last argument.\r\n\r\nThere is a hint, about using references or functions in options\r\n\r\n> If you provide a function or ref as the url parameter, or if you provide functions as arguments to the options parameter, then the useFetch call will not match other useFetch calls elsewhere in your codebase, even if the options seem to be identical. If you wish to force a match, you may provide your own key in options.\r\n\r\nFrom Data-Fetching docs\r\n\r\n> Since the autogenerated key only takes into account the file and line where useAsyncData is invoked, it is recommended to always create your own key to avoid unwanted behavior, like when you are creating your own custom composable wrapping useAsyncData.\r\n\r\nSince `useFetch` just wraps `useAsyncData` it could be that the same rule counts for `useFetch`, but its not clear from the docs. If you read the docs you would assume that `useFetch` passes a generated key by URL to `useAsyncData` independent from the file and line where it was invoked.\r\n\r\nUsing \r\n```ts\r\nuseFetch('/api/random', { key: 'my-key' })\r\n```\r\nprevents multiple calls.\r\n\r\n\r\n### **What would be expected behaviour?**\r\nWhenever the auto-generated `key` by passed url from `useFetch` is identical across components, the composable should act same as passing the `key` as option.\r\n\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[2014],{"name":2015,"color":2016},"pending triage","E99695",28169,"useFetch only prevents multiple requests when `key` option is set","2024-07-16T11:21:42Z","https://github.com/nuxt/nuxt/issues/28169",0.69938487,{"description":2023,"labels":2024,"number":2029,"owner":1991,"repository":1991,"state":2030,"title":2031,"updated_at":2032,"url":2033,"score":2034},"### Describe the feature\n\nHere is a reference:https://github.com/sot1986/nuxt-laravel-precognition\r\n\r\nThis package has a `useForm` function and it provide a way to custom the fetch client.\r\nIf the `useFetch` can provide something like this, that would be very nice.\r\n\r\nI have read the docs and I know I can define my own `useCustomFetch`, but I think `useFetch` is shorter and more eleganter.\n\n### Additional information\n\n- [ ] 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).",[2025,2028],{"name":2026,"color":2027},"3.x","29bc7f",{"name":2015,"color":2016},24004,"closed","Use custom $fetch client for useFetch","2023-10-29T04:04:47Z","https://github.com/nuxt/nuxt/issues/24004",0.6532043,{"description":2036,"labels":2037,"number":2040,"owner":1991,"repository":1991,"state":2030,"title":2041,"updated_at":2042,"url":2043,"score":2044},"### Environment\n\nnodejs: v18.17.3\r\nnuxt: v3.6.5\n\n### Reproduction\n\nhttps://stackblitz.com/edit/nuxt-starter-kdgkx9\n\n### Describe the bug\n\nmy code:\r\n\r\nWhen I click button “click me”, it will call function \"submitForm\" and the console will display:\r\n\r\nThis only outputs once \"111\", indicating that this function was only called once, but the network request shows this:\r\n\r\nThis request will not respond correctly because it is just a request I casually wrote to demonstrate the problem, which does not hinder the problem I want to describe because the correct request I wrote in my work will also have the same problem,and it did send two requests to my server.\r\nIt is obvious that it has made two requests, and I suspect that this issue is related to the cache of nuxt. However, using the official combination function \"clearNuxtData\" is not helpful. So did I make a mistake somewhere?\r\nThanks!\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2038,2039],{"name":2026,"color":2027},{"name":2015,"color":2016},22700,"The useFetch function sends 2 requests every time it is called","2023-08-22T10:30:08Z","https://github.com/nuxt/nuxt/issues/22700",0.67097384,{"description":2046,"labels":2047,"number":2050,"owner":1991,"repository":1991,"state":2030,"title":2051,"updated_at":2052,"url":2053,"score":2054},"### Environment\r\n\r\nUbuntu LTS\r\nNode LTS\r\nYarn \r\nNuxt 3.0 Stable (but the behavior was the same before upgrading)\r\n\r\n### Reproduction\r\n\r\nI made a quick unlisted video to show what I'm seeing : https://youtu.be/HLVo4bKutDc\r\n\r\nhere is the commit where I swapped useFetch() for $fetch which solved my problem \r\n[commit changing to $fetch](https://github.com/jurassicjs/nuxt3-fullstack-tutorial/commit/6285fd209826c9b706e907da51e92c62203c97a0#diff-cf165891da9c918972cea091125793e19b138cd81b25bde2b3236f604d7fd8ddR18)\r\n\r\nI wasn't able to reproduce the error on stackblitz. \r\n\r\n### Describe the bug\r\n\r\nuseFetch() sends doubled, but swapping useFetch() for $fetch does not. \r\n \r\nchanging useFetch() to $fetch caused to duplicate sending to stop. \r\n\r\n### Additional context\r\n\r\nThe component where the-double-sending-useFetch() is located is nested, and the parent component also contains a useFetch() \r\n\r\nPossibly related: https://github.com/nuxt/nuxt.js/issues/13369\r\n\r\n### Logs\r\n\r\n_No response_",[2048,2049],{"name":2026,"color":2027},{"name":2015,"color":2016},15528,"useFetch sends double Request in nested component ( Under some conditions )","2023-10-10T08:42:01Z","https://github.com/nuxt/nuxt/issues/15528",0.67624253,{"description":2056,"labels":2057,"number":2060,"owner":1991,"repository":1991,"state":2030,"title":2061,"updated_at":2062,"url":2063,"score":2064},"### Describe the feature\n\n我重新封装了一下useFetch,在使用的时候,通过onRequest添加Authorization。\r\n等我在组件内使用的时候,为了不触发依赖改变的自动请求,我就在onRequest函数内注入body参数,这样表单数据修改的时候,不会触发自动请求。\r\n\r\n由于onRequest是一个函数,所以我需要自己进行嵌套函数。\r\n如果是一个数组,就可以在数组随便push了。\n\n### Additional information\n\n- [ ] 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).",[2058,2059],{"name":2026,"color":2027},{"name":2015,"color":2016},19046,"useFetch的几个钩子现在是函数,希望变成数组形势","2023-02-16T08:44:15Z","https://github.com/nuxt/nuxt/issues/19046",0.6763085,{"description":2066,"labels":2067,"number":2072,"owner":1991,"repository":1991,"state":2030,"title":2073,"updated_at":2074,"url":2075,"score":2076},"### Environment\n\nNuxt 3 latest version\n\n### Reproduction\n\nthis cannot be done because there is no open service that will provide such an api to reproduce it. Can you advise me? I need an error to arrive at the same url, and then a callback occurs, but only without an error if the headers are correct.\n\nhttps://stackblitz.com/edit/nuxt-starter-74zqym?file=plugins%2Fapi.ts\n\n\n\n\n\n\nWhen the useFetch request is repeated, the data does not change. The fact is that when I go to the page where the USEFETCH wrapper is used, the data is processed correctly, but if in case of a 401 authorization error I need to call an additional function, a token request, after which I return the original function, the data does not change. How do I return the current data to the template? Hint. If done in useApi\n\n```\nexport async function useAPI\u003CT>(url: string | (() => string), options?: UseFetchOptions\u003CT>) {\n const response = await useFetch(url, {\n ...options,\n $fetch: useNuxtApp().$api,\n isUseFetch: true,\n })\n\n if (response.data.value.statusCode === 401) {\n await response.clear()\n await response.refresh()\n\n return response\n }\n\n return response\n}\n```\n\nclear() and refresh() then everything works properly, but there is a problem of hydration. How can I make the data in the component reactive and get the values from the second request?\n\n### Describe the bug\n\nI have tried many different ways, but there is a feeling that the problem is in nuxt. \n\nhttps://nuxt.com/docs/guide/recipes/custom-usefetch\n\nThe problem occurs at the moment when you press f5 on the page itself, and it gives a 401 error on the ssr side, then calls the method to get new tokens, and should call that very first request and get the data, but I have an error in the variable from that first request\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2068,2069],{"name":2015,"color":2016},{"name":2070,"color":2071},"needs reproduction","FBCA04",29378,"When the useFetch request is repeated, the data does not change","2024-10-16T17:25:36Z","https://github.com/nuxt/nuxt/issues/29378",0.68149483,{"description":2078,"labels":2079,"number":2082,"owner":1991,"repository":1991,"state":2030,"title":2083,"updated_at":2084,"url":2085,"score":2086},"### Describe the feature\r\n\r\nSuppose we need add automatically some headers for all requests ( for example Bearer token ) how can doing it without pass in all requests ?\r\n\r\ni think we must have api to change default $fetch instance to using it on all useFetch requests\r\n\r\n### Additional information\r\n\r\n- [ ] 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).",[2080,2081],{"name":2026,"color":2027},{"name":2015,"color":2016},18489,"support change instance of $fetch for using in useFetch and ...","2023-01-24T19:34:16Z","https://github.com/nuxt/nuxt/issues/18489",0.6844545,{"description":2088,"labels":2089,"number":2092,"owner":1991,"repository":1991,"state":2030,"title":2093,"updated_at":2094,"url":2095,"score":2096},"### Environment\n\nN/A\n\n### Reproduction\n\n[Reproduction](https://stackblitz.com/edit/nuxt-usefetch-bug?file=app.vue,composables%2Futil.ts).\n\n### Describe the bug\n\nWhen `useFetch` is shared between multiple calls, i.e it has been wrapped in another function the benefits of the `autoKey` are lost. \r\n\r\nIt is not uncommon to wrap `useFetch` in another function in order to set headers upon each request to an API, for example setting the authorization header. \r\n\r\nThis means that the autoKey is no longer unique. This is fine for most purposes but fails in some [specific circumstances](https://github.com/nuxt/nuxt/blob/9741f267be1c04a69f3a25204c175f98d834565b/packages/nuxt/src/app/composables/fetch.ts#L72). For example using function to define the path, `() => '/api/fetch'` with no unique query string or parameters. \n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2090,2091],{"name":2026,"color":2027},{"name":2015,"color":2016},22377,"`useFetch` hash collisions when sharing a call","2023-07-29T04:23:09Z","https://github.com/nuxt/nuxt/issues/22377",0.684668,["Reactive",2098],{},["Set"],["ShallowReactive",2101],{"TRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"qSxAu-0X-SZmD3ybUuHtbbfS2lEFbOu62IRKiEL9I-8":-1},"/nuxt/nuxt/26529"]