Comments (5)
@danielroe thanks for clarification!
Maybe it's better to raise an exception or log a warning if undefined value returned? Because this behaviour is not obvious
from nuxt.js.
Agreed! We could log a warning in dev mode? I think we might also consider updating types to exclude false return values.
from nuxt.js.
Why are you not returning something from useAsyncData?
from nuxt.js.
Why are you not returning something from useAsyncData?
It is a liitle bit non documentation way.
Anyway this behaviour is unexpected
from nuxt.js.
This is documented:
You (I suspect) are relying on useAsyncData to dispatch a side-effect like calling a pinia action. I would advise against that. useAsyncData is not guaranteed to execute the function on transitioning to the page. It might be extracted at build/generate time, for example. Or perhaps run in advance before navigating to another page.
from nuxt.js.
Related Issues (20)
- Types auto-import HOT 4
- Error "ENAMETOOLONG: name too long" occurs during pre-rendering on versions 3.11 and 3.12
- undefined title in google SERP? HOT 10
- When I build project, packed folder will loss some file in server/node_modules HOT 2
- The QueryString is double URL encoded when running `navigateTo` on the server side. HOT 1
- Instance type of Server component does not contain `refresh` HOT 2
- Hydration mismatch for nested server component HOT 3
- How to use nginx to reverse proxy nuxt3 with 5 different paths? HOT 1
- Route middleware causing duplicate runs on error HOT 2
- Custom useFetch losing original event during SSR HOT 1
- @nuxtbot nuxtbot changed the title Is there a way for Nuxt to render every page in SSR mode, rather than just the first time the page is opened? HOT 1
- Slot "default" invoked outside of the render function when using a composable (contains useLazyAsyncData) inside ClientOnly component HOT 7
- Imported css file with `?raw` should not be resolved HOT 1
- ERROR [nuxt] [request error] [unhandled] [500] [GET] "api/xx/yy": <no response> fetch failed. About using $fetch in server HOT 2
- how to set boost to false in nuxt.config.js HOT 2
- Replace vite-plugin-checker with something else HOT 4
- Unable to import useRuntimeConfig from a layer's server middleware HOT 1
- "UseFetchType" and also transforms the result into the desired output format using another transformer. HOT 1
- Utils Dir in compatibility Mode not auto-imported HOT 5
- You must define the vuex store in the server side and use VuexPersistencePlugin in the plugin list. 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.js.