docs(filters): correct the split-context comment
The prior wording claimed NotificationsPanel subscribes to actions only, but it reads filters (spreads them into setFilters). No consumer is actions-only today; describe the split's intent without the wrong example.
This commit is contained in:
@@ -17,10 +17,10 @@ import { accountKey, LS, readJSON, readMerged, writeJSON } from "../lib/storage"
|
||||
// through the tree. Mirrors NavigationProvider (split contexts + one-line hooks); composed in
|
||||
// main.tsx inside NavigationProvider, around <App/>.
|
||||
//
|
||||
// TWO contexts on purpose: a STABLE actions context (setFilters never changes reference) and a
|
||||
// CHANGING state context (the filters object). Context consumers re-render when their value changes,
|
||||
// so a component that only mutates filters (e.g. NotificationsPanel) subscribes to actions ONLY and
|
||||
// doesn't re-render on every filter tweak.
|
||||
// TWO contexts on purpose (mirrors NavigationProvider): a STABLE actions context (setFilters never
|
||||
// changes reference) and a CHANGING state context (the filters object). Context consumers re-render
|
||||
// only when the context they read changes — so a component that dispatches filter changes without
|
||||
// reading the current filters can subscribe to actions ONLY and skip re-rendering on every tweak.
|
||||
//
|
||||
// SCOPE NOTE: this owns the FEED's filters only. The channel detail page keeps its OWN isolated
|
||||
// filter state (ChannelPage) — it renders a channel-scoped catalog, not the global feed — and the
|
||||
|
||||
Reference in New Issue
Block a user