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.

Support for Vue 3

See original GitHub issue

Is your feature request related to a problem? Please describe. Would like to have Vue 3 supported now that is stable. I could create a PR if you want. https://github.com/vuejs/vue-next/releases/tag/v3.0.0

Describe the solution you’d like Support Vue 3.

Describe alternatives you’ve considered Tweaked the original to support Vue 3:

<template>
  <div :id="id"></div>
</template>

<script lang="ts">
import { nextTick } from "vue";
import { props, mixins } from "vue-class-component";
import { tsParticles } from "tsparticles";
import { Container } from "tsparticles/dist/Core/Container";
import { RecursivePartial } from "tsparticles/dist/Types/RecursivePartial";
import { IOptions } from "tsparticles/dist/Options/Interfaces/IOptions";

const Props = props({
  id: {
    type: String,
    required: true
  },
  options: {
    type: Object as () => RecursivePartial<IOptions>
  }
});

export default class Particles extends mixins(Props) {
  private particlesContainer?: Container;
  mounted(): void {
    nextTick(() => {
      if (!this.id) {
        throw new Error("Prop 'id' is required!");
      }
      tsParticles.load(this.id, this.options ?? {}).then((container) => (this.particlesContainer = container));
    });
  }
  beforeDestroy(): void {
    this.particlesContainer?.destroy();
  }
}
</script>

Additional context From their documentation, A Note for Plugin Authors: https://v3.vuejs.org/guide/migration/global-api.html#a-note-for-plugin-authors

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
daviddesmetcommented, Sep 21, 2020

No problem, I’m glad to help! Everything that’s needed to make the library even better 😊

1reaction
matteobrunicommented, Sep 21, 2020

Nice catch, thanks for that!! I’ll update it now!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frequently Asked Questions - Vue.js
What browsers does Vue support? # ... The latest version of Vue (3.x) only supports browsers with native ES2015 support. This excludes IE11....
Read more >
Vue.js 3 support - BootstrapVue
Quickly integrate Bootstrap v4 components with Vue.js. ... @vue/compat support is designed for early migration to Vue.js 3 and will be eventually replaced ......
Read more >
Which UI Frameworks Support Vue 3? - In Plain English
Amplify UI is a component library (38 components) with support for Vue 3 and focus on Amazon AWS compatibility.
Read more >
Vue 3 – A roundup of infos about the new version of Vue.js
This version will be available as a LTS (long-term support) version for 18 months, which means that it will still get security updates...
Read more >
The best UI frameworks for Vue 3 - LogRocket Blog
BalmUI features support for Vue 3 since its version 9.0. Balm is based on Google's Material Design, which is why it may look...
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