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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bytesofman added inline comments.
cashtab/src/components/Configure/Configure.js
571 ↗(On Diff #44786)

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.