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

"this.$pnSubscribe" not working in the wrapper or just outdated docs? #9

Open
ninjamon23 opened this issue Jun 17, 2021 · 3 comments
Open

Comments

@ninjamon23
Copy link

Hi,

Is the "this.$pnSubscribe" still working or just outdated docs because we can't seem to make it work? Had to use the actual pubnub instance and use the subscribe there. Also on the https://www.pubnub.com/docs/sdks/javascript/vue only the "$pnGetMessage, $pnGetPresence, $pnGetStatus" are available and working fine. Thank you.

@bragma
Copy link

bragma commented Jun 18, 2021

I think the entire project is badly outdated. It does not work with Vue 3 due to the use of Vue.prototype.

@jameskirtland3
Copy link

@bragma's assessment appears to be correct. This is an unfortunate consequence of Vue changing a lot of its internal architecture with the new version- virtually every library and plugin fails without being attended to.

@lk77
Copy link

lk77 commented Apr 29, 2022

@bragma i cheated a little

app.use((app) => {
  let Vue = {
      mixin: (m) => {
          app.mixin(m);
      },
      prototype: {}
  };

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

  Object.keys(Vue.prototype).forEach((key) => {
      app.config.globalProperties[key] = Vue.prototype[key]
  });
})

and it works fine,

there is nothing specific to vue in this package apart from the prototype additions

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

4 participants