refactor: de-class CoursewareContainer (#2020)
Convert CoursewareContainer from a class + connect component to a functional
component using hooks. Structural only — no data-layer or behavior change: it
dispatches the same thunks and reads the same store. This unblocks the later
courseware React Query peels, which need a function component to call query
hooks a class can't.
- class -> function; connect -> useSelector/useDispatch
- inline the route hooks (useParams/useNavigate/useLocation) and delete the
withParamsAndNavigation HOC (utils.jsx), its only consumer
- keep the reselect memoize fetch/save guards (held in refs, reading a
per-render latest ref) inside one no-dependency effect, matching the old
componentDidMount + componentDidUpdate exactly
- drop the dead previousSequence selector/prop (unused; keep the empty
previousSequenceHandler that Course still requires)
- guard useIFrameBehavior's activeSequence.unitIds read: removing connect lets
the global getSequenceId briefly lead the rendered sequenceId prop, so the
sequence model can transiently be the outline stub (no unitIds)
- drop dead fetchCourseRecommendations{Request,Success,Failure} exports
(orphaned from the recommendations RQ conversion in #1967)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> B
Brian Smith committed
a3a4bcfa727cc877cd72738819f54922030d0aea
Parent: 50df091
Committed by GitHub <noreply@github.com>
on 8/24/2026, 9:53:46 PM