question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vue3 - Use loader instance in store or router

See original GitHub issue

This is not a issue. Its question or feature request (if not available)

Your documentation mentions that it can be used inside any component or via composition api. Glad it support both.

I couldn’t find a way where it can be used inside store or router. I tried following:

but it broke the code and showing errors in console.

  • Vue.js version : 3.x
  • Browser name and version : Chrome 92
  • This package version : 4.x.x

Current behavior

import { useLoading} from 'vue-loading-overlay'
const $loading = useLoading()

image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ankurk91commented, Dec 22, 2021

This has been fixed with v5

npm install vue-loading-overlay@5.0.0
1reaction
ankurk91commented, Dec 22, 2021

I am planning to use rollup for bundling since webpack does not support named-export. There is no ETA.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue 3 access to app level provided instances from vue-router
I can export the app instance from main.js file and then use app.$store and app.$puex instead. Although it works, I still think about...
Read more >
How to Use Vue Router: A Complete Tutorial - Vue School Blog
In this article, we will deep dive into Vue Router 4 (used with Vue 3). We will go over everything you need to...
Read more >
Vue Router and the Composition API
The introduction of setup and Vue's Composition API, open up new possibilities but to be able to get the full potential out of...
Read more >
Using Vue 3's Router in Practice - Daily.dev
Vue Router is one such library that's deeply integrated with VueJS. This article will guide you in setting up Vue Router with Vue...
Read more >
Vue Router: A Tutorial for Vue 3 - Vue Mastery
Many things are the same in Vue 3 using Vue Router, but there are a few small differences from Vue 2. In this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found