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.
Part of #1946 — Redux → React Query migration (Stage 1).
Goal: dig into
@edx/frontend-lib-special-examsand 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 onopenedx/frontend-lib-special-exams, not a "let's figure it out" one.What we already know (starting point):
reducerthat learning registers underspecialExamsinsrc/store.ts— the only place it's mounted.state.specialExamsitself; its own exam data lives incourseHome.examsData.useSelector/useDispatch:OuterExamTimer(inTabWithTimer, so on every course-home tab),SequenceExamWrapper(coursewareSequence), and theuseExamAccesshooks (every coursewareUnit).redux/react-redux/@reduxjs/toolkitin learning's ownpackage.json(transitive redux pulled in by the library is fine).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):
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.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.tsteardown), not any of learning's internal React Query conversions.