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

setup element when didmount #182

Merged
merged 1 commit into from
Oct 25, 2022
Merged

Conversation

WillXing
Copy link
Contributor

Why

React18 is providing concurrent feature, to this component specifically, it will need the component to mount and unmount couple times and got the same result, issue is surfaced by strict mode. see more information here,

The current implementation is setting up element events in constructor but destroy it when unmount, so when react18 unmount the component and mount again, element won't get setup again.

Changes

  • Move setup into didmount lifecycle.

@WillXing WillXing changed the title adapt to react18 setup element when didmount Aug 16, 2022
@coveralls
Copy link

Pull Request Test Coverage Report for Build 846

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 98.947%

Totals Coverage Status
Change from base Build 815: 0.004%
Covered Lines: 222
Relevant Lines: 222

💛 - Coveralls

@chrissrogers chrissrogers merged commit c11315f into recurly:main Oct 25, 2022
recurly-integrations pushed a commit that referenced this pull request Oct 27, 2022
[Full Changelog](v1.2.4...v1.2.5)

**Merged Pull Requests**

- listen_for_attach_event [#187](#187) ([smagdicatrecurly](https://github.com/smagdicatrecurly))
- Adds demo for automated focus shift on individual card Elements [#183](#183) ([chrissrogers](https://github.com/chrissrogers))
- setup element when didmount [#182](#182) ([WillXing](https://github.com/WillXing))
- Docs fix: UseCheckoutPricingInput `subscriptions` [#157](#157) ([javimbk](https://github.com/javimbk))
- Docs Fix: useRecurly Paypal example [#156](#156) ([javimbk](https://github.com/javimbk))
- Revert "add security to github CODEOWNER file" [#147](#147) ([eternal44](https://github.com/eternal44))
- add security to github CODEOWNER file [#142](#142) ([eternal44](https://github.com/eternal44))
- fix(lib/provider.js): fix RecurlyProvider throwing error when fraud property is set [#123](#123) ([mikeedwards](https://github.com/mikeedwards))
recurly-integrations pushed a commit that referenced this pull request Oct 27, 2022
[Full Changelog](v1.2.4...v1.2.6)

**Merged Pull Requests**

- listen_for_attach_event [#187](#187) ([smagdicatrecurly](https://github.com/smagdicatrecurly))
- Adds demo for automated focus shift on individual card Elements [#183](#183) ([chrissrogers](https://github.com/chrissrogers))
- setup element when didmount [#182](#182) ([WillXing](https://github.com/WillXing))
- Docs fix: UseCheckoutPricingInput `subscriptions` [#157](#157) ([javimbk](https://github.com/javimbk))
- Docs Fix: useRecurly Paypal example [#156](#156) ([javimbk](https://github.com/javimbk))
- Revert "add security to github CODEOWNER file" [#147](#147) ([eternal44](https://github.com/eternal44))
- add security to github CODEOWNER file [#142](#142) ([eternal44](https://github.com/eternal44))
- fix(lib/provider.js): fix RecurlyProvider throwing error when fraud property is set [#123](#123) ([mikeedwards](https://github.com/mikeedwards))
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

Successfully merging this pull request may close these issues.

3 participants