Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting subscribeKey after initialisation #8

Open
lk77 opened this issue Feb 11, 2021 · 0 comments
Open

Setting subscribeKey after initialisation #8

lk77 opened this issue Feb 11, 2021 · 0 comments

Comments

@lk77
Copy link

lk77 commented Feb 11, 2021

Hello,

i have an use case where the subscribe key is in a vuex store, and is not available at the initialisation of the plugin :

Vue.use(PubNubVue, {
    subscribeKey: null,
    ssl: true,
    uuid: null
});

I'm then subscribing to the vuex store, and then i'm updating subscribeKey, but there is no easy method to do it.

i've done :

PubNubVue.getInstance().setUUID($store.state.pbnUUID).subscribeKey = $store.state.pbnSubscribeKey

it works but a method like this could be usefull :

PubNubVue.setConfig({
    subscribeKey: $store.state.pbnSubscribeKey,
    ssl: true,
    uuid: $store.state.pbnUUID
})

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant