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)
- "I want to pass in a user-defined function, but runtimeConfig cannot pass in functions and arrays." HOT 4
- Tailwindcss added at last is not applied HOT 5
- Disabling SSR prevents remaining CSS from loading HOT 3
- Error: Cannot find module punycode/ HOT 9
- Img @error not working HOT 2
- useHead undefined after initiating a regex (since monday) HOT 4
- keepalive not work HOT 1
- String vs object errors with `createError` and accessing server-thrown errors on client
- Tailwind css issue related to CSS specificity on dev server HOT 1
- keep alive caches are destroyed when visit keep alive excluded page HOT 2
- The package generated under the .output/server/node_modules file is a hyperlink. HOT 1
- 'text/html' is not a valid JavaScript MIME type. HOT 1
- This module cannot be imported in the Vue part of your app. [importing @nuxt/kit from app.vue] causing page to not work HOT 5
- If a component uses empty data in `useFetch`, then `clearError` will be invalidated HOT 2
- Cache control header missing in response headers (while using nitro.publicAssets) HOT 4
- [nuxt] [request error] [unhandled] [500] _fetch is not a function HOT 3
- feat: support passing options to `TypedRouterOptions` when using `experimental.typedPages` HOT 3
- Dynamic layouts HOT 3
- Previous route info HOT 2
- Imported CSS files not correctly injected in circumstances involving lazy-loaded components 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.