openedx / openedx/frontend-app-learning

Investigate the special-exams Redux blocker and decide the approach (self-contained store vs React Query)

Open
#2,018 0 comments 0 reactions 1 assignee View on GitHub

@brian-smith-tcril is already working on this.

Since Aug 20, 2026.

Dominant language
JavaScript
Stars
70
Forks
335
Avg merge
1d 17h
Merged PRs (30d)
35

Description

Part of #1946 — Redux → React Query migration (Stage 1).

Goal: dig into @edx/frontend-lib-special-exams and decide the exact approach for removing the last Redux dependency it forces on learning. Produce a decision + recommendation. This is an investigation, not an implementation — if it concludes a library change is required, the follow-up is a concrete "here is exactly what we'll do" issue on openedx/frontend-lib-special-exams, not a "let's figure it out" one.

What we already know (starting point):

  • The library exports a reducer that learning registers under specialExams in src/store.ts — the only place it's mounted.
  • Learning never reads or writes state.specialExams itself; its own exam data lives in courseHome.examsData.
  • Runtime coupling is three consumers that internally use useSelector/useDispatch: OuterExamTimer (in TabWithTimer, so on every course-home tab), SequenceExamWrapper (courseware Sequence), and the useExamAccess hooks (every courseware Unit).
  • The goal is no redux/react-redux/@reduxjs/toolkit in learning's own package.json (transitive redux pulled in by the library is fine).
  • frontend-base's SiteProvider supplies no store and the shell ships no redux, so learning can't lean on the shell for a Provider — and self-hosting a mini store would keep redux as learning's own dependency. So the Provider/store must ultimately come from the library.

Options to evaluate (cheapest first):

  • Option A — self-contained library store. The library ships its own module-level store and wraps its exported components/hooks in their own react-redux <Provider>, so consumers register no reducer and supply no store. Verify feasibility (single shared store instance across OuterExamTimer + SequenceExamWrapper + access hooks; no reliance on the consumer's store), effort, and any behavior/version implications.
  • Option B — React Query conversion of the library. Larger, aligns with OEP-0067 ADR-0010. Scope only enough to compare cost/benefit against A.

Deliverable: a written recommendation (A vs B vs other), the concrete change it implies, and — if a library change is warranted — a drafted, specific implementation issue ready to file on frontend-lib-special-exams.

Note: this gates only the final dependency removal (#1978's package.json/store.ts teardown), not any of learning's internal React Query conversions.

Contributor guide

Open the contributing guide

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.