openedx / openedx/frontend-app-learning

Dissolve the model-store normalized cache

Open
#1,977 0 comments 0 reactions 1 assignee View on GitHub

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

Since Aug 5, 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: delete the normalized models cache now that React Query is the cache.

Tasks

  • After the feature conversions, audit remaining state.models.* selectors (generic/model-store, src/data/hooks.ts useContextId, …) and move any residual reads to query data.
  • Provide a small replacement for useContextId (read the active courseId from route/params or a context) — it currently reads courseware / courseHome Redux state.
  • Delete the generic/model-store slice and the models reducer.

Verify: no state.models references remain; full suite green.


Note (size): most useModel readers (204 sites / 82 files today) fall away as courseware converts (#1976 and its siblings, esp. the metadata/sequence layers, keep them alive via the model-store bridge). Reassess this issue's residual scope once the courseware decomposition lands — it may split (e.g. useContextId replacement vs. bridge removal). The useContextId replacement also overlaps with the courseware teardown (#1976); coordinate so it isn't done twice.

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.