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

[BUG] Button not detecting prop changes and re renders with previous props #102

Open
athoifss opened this issue Apr 17, 2021 · 0 comments
Open

Comments

@athoifss
Copy link

It seems like upon re rendering (through prop change) the options object does not detect the new change and still renders the checkout with old props.

<PayPalButton
      options={{ clientId: clientID, currency: props.currency }}
      createOrder={createOrder}
      onApprove={onApprove}
 />

I did an ugly hack where I am forcefully re rendering the component on props.currency change. The component re renders all right but still with the previous options . The new props.currency is not being updated in checkout.

@athoifss athoifss changed the title [BUG] [BUG] Button not detecting prop changes and re renders with previous props Apr 17, 2021
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