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

createSubscription prop freezes the value of outer scope variables #629

Open
giladv opened this issue Feb 25, 2025 · 0 comments
Open

createSubscription prop freezes the value of outer scope variables #629

giladv opened this issue Feb 25, 2025 · 0 comments

Comments

@giladv
Copy link

giladv commented Feb 25, 2025

Library used

react-paypal-js

🐞 Describe the Bug / Minimal Reproduction

<PayPalButtons createSubscription={function (data, actions) { 
    // will never have the up to date value. always the value when first rendered.
    console.log(props) 
}}/>

🤔 Expected Behavior

createSubscription prop should act like a normal function in which a new version of it is set on every render

🌍 Environment

  • Node.js/npm: any
  • OS: - osx
  • Browser: - chrome latest
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

2 participants
@giladv and others