The github repositories mentioned in https://www.npmjs.com/package/idle-vue-3/v/1.0.1 do not have issues page. So, I guess I have to post it here. The documentation provided is not really Vue 3 at all. Many of the APIs used in the documentation are obsolete. Things like import Vue from 'vue';, Vue.use, etc. WTF is that project owner doing!?!
I bump into error with the following code snippet:
app.use(IdleVue, {
eventEmitter: Vue,
//store,
store: Store,
idleTime: idleTimeInMillis,
startAtIdle: false
});
Store is imported from another .js file:
export default async () => {
const Store = createStore({
modules: {
rules,
utils
},
// enable strict mode (adds overhead!)
// for dev mode only
state: {
clients: []
},
mutations: vuexfireMutations,
actions: {
bindClient: firestoreAction(async (context, ref) => {
return await context.bindFirestoreRef("clients", ref);
})
},
strict: process.env.DEV
});
return Store;
}
The browser console shows the following error:
boot error: TypeError: r.registerModule is not a function
which happens on line app.use(IdleVue, {. Any advice and insight is appreciated
What do you mean obsolete? It's scheduled to be deprecated but it's not deprecated yet.
WTF is that project owner doing!?!
The project owner did what he wanted, create an idle-js wrapper for Vue.
Vue 3 was officially release in September 2020.
idle-vue existed even back in 2019.
If you checked the repo, you'd see it was a fork.
The forked repo is released under the name idle-vue: https://www.npmjs.com/package/idle-vue
idle-vue-2 is taken but empty: https://www.npmjs.com/package/idle-vue-2
idle-vue-3 is the fork version with more changes applied to it.
Check the issue: https://github.com/soixantecircuits/idle-vue/issues/49 for your question.
Just use idle-js yourself or make a fork of your own and support Vue 3.