You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .ai/rules/list-view-with-filters.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,9 @@ This pattern complements `layer-ui.md` and `layer-application.md`.
35
35
- Guards `onEndReached` with `isConnected && hasNextPage` to avoid offline fetches
36
36
- Uses `ItemSeparatorComponent` from `@components/layout`
37
37
7.**ListView Screen**: `{Entities}ListView` is layout-only — it orchestrates `FiltersBar` + `List` but contains NO data-fetching logic directly. Data fetching lives inside the list component or a dedicated hook.
38
+
- If the screen needs navigation to `{Entity}FormView`, use one of these valid patterns:
8.**Persistence**: Persist active filters per source/entity via Zustand + MMKV. Re-hydrate on mount; sanitize stale keys when the source changes. Shared UI search state (e.g. for cross-screen search persistence) should live in `@modules/core/application/app.storage.ts`.
39
42
9.**Query Key Fingerprint**: Serialize filters with `JSON.stringify` to build a stable cache fingerprint. Include the fingerprint in the `queryKey`.
0 commit comments