Page MenuHomePhabricator

[Cashtab] Remove async useEffect methods
ClosedPublic

Authored by bytesofman on Jan 31 2024, 11:52.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC2f1ffc55715f: [Cashtab] Remove async useEffect methods
Summary

React 18 does not support async useEffect blocks. In prep to upgrade to React 18, refactor these blocks so that we are not awaiting withing useEffect

Note: we can still achieve the same functionality. This is a syntax issue.

Test Plan

Confirm new functions contain exact content of old useEffect blocks. npm test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
no-async-use-effect
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26792
Build 53152: Build Diffcashtab-tests
Build 53151: arc lint + arc unit

Event Timeline

bytesofman added inline comments.
cashtab/src/components/Configure/Configure.js
571

in this case, there is no need to await within the useEffect, so simply remove async/await

This revision is now accepted and ready to land.Jan 31 2024, 14:54
This revision was automatically updated to reflect the committed changes.