openedx / openedx/frontend-app-learning
Investigate the special-exams Redux blocker and decide the approach (self-contained store vs React Query)
@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
reducerthat learning registers underspecialExamsinsrc/store.ts— the only place it's mounted. - Learning never reads or writes
state.specialExamsitself; its own exam data lives incourseHome.examsData. - Runtime coupling is three consumers that internally use
useSelector/useDispatch:OuterExamTimer(inTabWithTimer, so on every course-home tab),SequenceExamWrapper(coursewareSequence), and theuseExamAccesshooks (every coursewareUnit). - The goal is no
redux/react-redux/@reduxjs/toolkitin learning's ownpackage.json(transitive redux pulled in by the library is fine). - frontend-base's
SiteProvidersupplies 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 acrossOuterExamTimer+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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.