Comments (3)
This already exists: https://nuxt.com/docs/guide/directory-structure/components#server-components
from nuxt.
This already exists: https://nuxt.com/docs/guide/directory-structure/components#server-components
Using server components would mean that for every slightly different footer I would need a new component. The beauty of the <ClientOnly>
component is that it simply accepts markup in its slot instead of requiring a new component for every area where it is used.
from nuxt.
Ah, I see. We use https://github.com/freddy38510/vue3-lazy-hydration for such things. So you can wrap your time output in template with:
<template>
<LazyHydrationWrapper>
{{ new Date() }}
</LazyHydrationWrapper>
</template>
Having no lazy-hydration specific prop on < LazyHydrationWrapper>
means it will never hydrate on client side.
There is also really nice nuxt-module to wrap vue3-lazy-hydration: https://github.com/Baroshem/nuxt-lazy-hydrate.
With this, you'd use <NuxtLazyHydrate>
instead of <LazyHydrationWrapper>
.
There is an open issue to bake this into nuxt. Hopefully it will land some day: #24242
from nuxt.
Related Issues (20)
- Transform components imported by explicit import
- docs: improve testing component example to avoid auto import misunderstanding HOT 4
- During the development process, the error Last few GCs will be reported. HOT 1
- Infinite warn and memory crash when updating nuxt from 3.10 to 3.11 HOT 2
- nitro has memory leak when building with loglevel 3 but not loglevel 1 HOT 2
- Custom useFetch type error HOT 5
- Latest nuxt version delays the load of CSS on SSR HOT 3
- Cannot read documentation HOT 1
- showError doesn't trigger `app:error` (anymore?) HOT 1
- Nuxt Docs seem broken HOT 5
- ReportingObserver [deprecation]: Unload event listeners are deprecated and will be removed
- Suggest supporting React component import to compensate for the current deficiencies in the Vue ecosystem. HOT 1
- Page loading triggered when navigating to same page with different fragment HOT 9
- Is there any way to change the runtimeConfig attribute defined in nuxt.config.ts in the plugin in nuxt 3.6.5 version? HOT 1
- Hello, there is a duplicate item in the compilerOptions.paths in tsconfig.server.json, which includes "~/*": ["../*", "../*"] HOT 5
- nuxt provides a simplified version of the documentation HOT 1
- loading animation (spaLoadingTemplate) disappears before request fully loaded HOT 3
- Restore scrollposition flicks on browser back
- TS error `...will overwrite file` when certain files exist
- [feat] useLoadingIndicator error 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.