Comments (2)
This isn't a Nuxt-specific issue. But the problem is that your Symbol
is unique, which means on hot reload (because only one component is reloaded) the symbol differs from parent + child. Instead you can use a global registry:
import { provide, inject, type InjectionKey } from 'vue';
export function useProvideContext<ContextValue>(contextName: string) {
- const injectionKey: InjectionKey<ContextValue | null> = Symbol(contextName);
+ const injectionKey: InjectionKey<ContextValue | null> = Symbol.for(contextName);
// ...
}
from nuxt.js.
Start a new pull request in StackBlitz Codeflow.
from nuxt.js.
Related Issues (20)
- Can't get relative builds to work: Building with `baseURL: "./"` doesn't result in relative paths, building with `baseURL: "."` breaks subpages HOT 5
- Prerendering fails when `viteCompression` plugin is used HOT 1
- Nuxt Layers are sharing their config HOT 6
- Default imports from layers on another directory fails HOT 5
- Why are the bullet points hidden? HOT 1
- Data fetching inside a composable breaks useHead HOT 7
- How do I add preload to index.css HOT 1
- Composables with explicit import are not keyed HOT 1
- [SSR] Possible bug with Intl.DisplayNames of type region HOT 4
- [nuxt] [request error] [unhandled] [500] Cannot read properties of undefined (reading 'env') HOT 4
- useRoute() params are stale in asyncData() when navigate within application to page using nuxt-link HOT 1
- routeRules proxy omits Content-Encoding header HOT 3
- Async/Await in router.options.ts with a nuxt composables breaks the app HOT 6
- Error deploying NUXT 3 application on IIS server
- Plugin types break if I add @nuxtjs/i18n to modules HOT 8
- useFetch doesn't convert Date to string HOT 4
- Add `#shared` alias
- Deploy production without node_modules directory HOT 2
- Server side useCookie problem
- Potential Memory Leak
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.