Comments (1)
useFetch or useCustomFetch are composables and should be called in setup, not in a callApi method in a store.
If you do need to pass the Nuxt instance, you can run useNuxtApp at the top of your store method and then nuxtApp.runWithContext to call your custom composable.
from nuxt.
Related Issues (20)
- WARN [nuxt] Expected @nuxt/schema to be at least 3.12.2 but got 3.11.2 HOT 7
- How to solve the issue where data fetched using useFetch isn't requested again after refreshing the page? The solution lies in configuring the cache of the useFetch Hook.
- "How do you solve the problem where data fetched by useFetch is not re-requested again after refreshing the page in Nuxt 3.11.2?" HOT 1
- in Nuxt3.11.2,How to solve the issue where data fetched using useFetch isnβt requested again after refreshing the page? HOT 1
- useRoute() inside $fetch interseptors HOT 1
- Nuxt 3 Webpack Invalid Token In Dev Mode HOT 1
- ERROR invalid options argument after upgrading 2.17.4 -> 2.18.0 HOT 2
- Server Components `useRoute` not updating HOT 2
- 404 error when using navigateTo in a middleware HOT 4
- Enabling compatibilityVersion: 4 not working as expected when using layers HOT 2
- What is the best practice for useId and getting rid of these hydration errors.
- Development server keeps trying to reach localhost:24678 which doesn't exist HOT 12
- useCookie navigateTo new page hydration HOT 6
- SSR Context Lost HOT 5
- [nuxt] `useId` might not work correctly with components that have `inheritAttrs: false`. HOT 3
- When running npm run generate, the script path is incorrect. HOT 2
- Server component cannot be used with kebab-case HOT 1
- 404 error after running `npx nuxi generate` with `app.baseURL` set. HOT 6
- Fail to alter the nuxt config via module HOT 5
- Nuxt 3.12 - ssr: false, nuxt generate - 404 on routes after page refresh HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuxt.