Giter Club home page Giter Club logo

Comments (2)

AndrewBogdanovTSS avatar AndrewBogdanovTSS commented on June 21, 2024

Problem 1: Wrapping <div> inside client only is redundant, Nuxt has no issues with rendering html markup

<template>
  <div ref="paypalContainer" />
</template>

Problem 2: Checking for process.client inside a function that is called inside mounted() hook is redundant, because mounted hook is never called on the server, nextTick is also redundant

mounted () {
    this.renderPayPalButton()
  },

Problem 3: async functions should be called with await

mounted () {
    await this.renderPayPalButton()
  },

Problem 4: wrapping component in client-only is redundant because you use mounted, the only reason for using client-only is when you want to call something in setup or you have some logic that should be executed before component is mounted but still only on the client, here we clearly see - it's not the case

<PayPalButton />

Problem 5: Plugins that are called on the client only should contain .client.ts in the name or be loaded inside plugins with a special syntax (check Nuxt docs)

Problem 6: When you want to get a solution to the problem you should describe it properly, if something is not showing you probably get some errors in terminal/console, what those are?

from paypal-js.

wsbrunson avatar wsbrunson commented on June 21, 2024

@Rexhmati did @AndrewBogdanovTSS's answers help solve your issue?

from paypal-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.