weareseeed / react-square-web-payments-sdk

Easily create PCI-compliant inputs to accept payments online with the Square Payments API. It supports the following payment methods: credit and debit cards, ACH bank transfers, Apple Pay, Google Pay, Gift Cards and Afterpay/Clearpay.
https://react-square-payments.weareseeed.com/
MIT License
38 stars 41 forks source link

Unmount fix applied to cashapp #89

Closed franciscomdelgado closed 1 year ago

franciscomdelgado commented 1 year ago

Your checklist for this pull request

🚨Please review the guidelines for contributing to this repository.

Description

We need to conditionally unmount our cash app instance and when re-rendering we get the following error.

Screenshot 2023-02-14 at 4 52 06 PM

We call destroy on the cash app instance on unmount and this allows us to re-render the component without any issue. I understand your request that we do not attempt to PR "our master" but we did not see this on the roadmap or issues.

🧡 Thank you!