paypal / paypal-js

Loading wrapper and TypeScript types for the PayPal JS SDK
Apache License 2.0
238 stars 83 forks source link

fix: button rerender issue due to obj in dependency array #521

Closed danzhaaspaypal closed 5 months ago

danzhaaspaypal commented 5 months ago

Button rerender was rerendering unintentionally due to a non-primitive value, the message obj, being passed into the useEffect dependency array. This fixes the issue by stringify-ing the message.

changeset-bot[bot] commented 5 months ago

🦋 Changeset detected

Latest commit: 8f6f832e64b32aa8ba6aa4d264fb8e149182b9c7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ----------------------- | ----- | | @paypal/react-paypal-js | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR