divviup / divviup/divviup-api

Add cleanups to `useEffect()` calls with callbacks

Open
#876 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Chore React App
Dominant language
Rust
Stars
10
Forks
5
Avg merge
2h 41m
Merged PRs (30d)
66

Description

There are a few useEffect() calls that take a promise and call then() on it. (These are in TaskTitle(), AccountName(), and usePromise()). There's also one in ErrorPage, but it's moot because the effect navigates away from the app.) These should return cleanup functions, following the usual cancellation flag pattern. It's possible that rapid clicks, plus HTTP requests completing out of order, could lead to confusing UI interactions, and ignoring promise resolutions from old invocations of effects will fix these potential issues.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the useEffect calls in TaskTitle(), AccountName(), and usePromise(), and inspect how their promises call then(). Follow the usual cancellation-flag cleanup pattern so resolutions from older effect invocations are ignored; ErrorPage is out of scope because its effect navigates away. Done means each listed effect returns cleanup behavior that prevents stale rapid-click results from affecting the UI.

Written by the indexing model from the issue text.

Assessment

Tech stack
react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.