lsst-epo / lsst-epo/epo-react-lib

Refactor useEffect usage in OrbitalSimProvider

Open
#398 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

chore nice-to-have
Dominant language
TypeScript
Stars
4
Forks
0
PR merge metrics
No merged PRs in 30d

Description

In the Orbital Sim context provider state is being updated in useEffect hooks which very likely falls under situations [where `useEffect` is not the correct choice](packages/epo-widget-lib/src/widgets/OrbitalSim/Context/index.tsx).

Tasks to resolve this issue:

- Verify whether or not `useEffect` is the appropriate choice for managing state updates here
- If not, refactor the context provider so that it does not incorrectly use `useEffect`

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

Start with packages/epo-widget-lib/src/widgets/OrbitalSim/Context/index.tsx and inspect each useEffect that updates provider state. Compare those uses with the project’s React patterns and guidance on when useEffect is appropriate. Done means the provider no longer uses useEffect incorrectly while preserving its existing state behavior; verify with the relevant existing checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.