4

this is my first Q on stackoverflow.

I'm looking for something like singleton pattern in components in Vue/Nuxt; i mean a component which just 1 instance of it exists per page, even though it's included in K different components. is there any built-in mechanisms or robust ideas to implement this?

i know i can have a variable in store which turns True as first component loads and it prevents the next components from loading (for example using a single v-if) but I'm looking for a cleaner, preferably more built-in way of doing it.

  • This question is already answered, I think, see https://stackoverflow.com/questions/52944052/creating-a-single-instance-of-a-class-within-a-vue-application. – Wouter Jun 24 '21 at 07:06

0 Answers0