Comments (5)
@sebaguse Will cause the same problem from V4 on as it will rely on status. see #25864
from nuxt.js.
My guess: It is success
at first because data exists already (was previously fetched), then the fetching is triggered again. You can double-check that if you add a new Date()
to the API response.
I agree that it isn't convenient/it is confusing.
(cc @danielroe wdyt?)
from nuxt.js.
Let's say I want to show a loading placeholder until the status is success and don't want to display the old data. So, in current condition, it will first render old data, then render the loading placeholder and then get the new data and then will render it. Which is a problem. Will it be fixed or there is another way of doing it?
from nuxt.js.
what about using pending
for a placeholder instead of status
, would that work?
from nuxt.js.
what about using
pending
for a placeholder instead ofstatus
, would that work?
Doesn't work. When status is idle or pending then pending is true. When status is success or error then pending is false. So, the behavior will be similar. Pending will be false for a split second => true => false.
from nuxt.js.
Related Issues (20)
- Hydration mismatch when using `Teleport` in combination with `useHead` scripts at `'bodyOpen'` position HOT 3
- useFetch returns null used in component when on parent data is loaded via composable useFetch on route watch HOT 5
- Unusaual page reload after creating file in server event handler HOT 1
- Package manager order in docs/getting-started/installation HOT 2
- Useless sourcemaps generated during production build
- useSEOMeta or useHead, og tag dynamic assigned by requests can't not be fetch by FB or LINE sharing HOT 6
- After importing the @ nuxtjs/i18n module, the automatically imported function cannot find the type declaration in the template HOT 1
- Nuxt3.12.0 cant use nuxt-socket-io HOT 2
- hooks not called HOT 2
- Cannot read properties of undefined (reading 'replace') HOT 4
- protocol relative `cdnUrl` creates prerendering errors HOT 2
- cloudflare-pages does not generate static pages HOT 3
- SWR Cache saving headers HOT 3
- Nuxt $fetch throws exception when accessing API with subdomain HOT 4
- [SSG] Implement Route-Based Dynamic SEO Meta Tags in SSG HOT 5
- [Docs]: vue-tsc version are different in actual .md file and docs site HOT 1
- Creating new Nuxt 3 project results in multiple issues on Windows 10 HOT 2
- Change .env file does not update runtimeConfig HOT 1
- Route Groups not working HOT 2
- the unscoped css in a layout remains even after changing the layout in dev `nuxt dev` HOT 1
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.