···11+## No prefetching (baseline)
22+33+This is the baseline approach — no prefetching whatsoever. Every page navigation triggers a fresh network request, and the user sees loading skeletons while data is fetched on demand.
44+55+### How it works
66+77+1. The user navigates to the page
88+2. React Query fires the fetch request from the component
99+3. A loading skeleton renders while the query resolves
1010+4. Data arrives and the table renders with results
1111+1212+### Trade-offs
1313+1414+- **Latency**: Every navigation incurs a full server round-trip
1515+- **UX**: Loading skeletons are visible on every page visit
1616+- **Simplicity**: The implementation is the easiest to understand and maintain
1717+1818+### When to use
1919+2020+This pattern works for low-traffic pages, internal tools, or anywhere the performance overhead of a round-trip is acceptable. It is the simplest possible starting point before adding any prefetching strategy.
+19
src/articles/content/debounced-preload-filters.md
···11+## Debounced filter prefetch
22+33+Debounced preloading extends filter-based prefetching by initiating fetches on every keystroke — not just on form submission. A debounce window ensures the server is not overwhelmed by rapid-fire requests.
44+55+### How it works
66+77+1. The user types in the filter input
88+2. Each keystroke updates the search params after a short debounce delay
99+3. React Query fires a prefetch for the new parameter values
1010+4. Results update incrementally as the user types
1111+5. The user sees live-filtered results without needing to press submit
1212+1313+### Debounce strategy
1414+1515+The debounce delay balances responsiveness with server load. A 300–400ms window prevents unnecessary intermediate requests while still feeling snappy to the user. TanStack Pacer provides the debouncing primitive.
1616+1717+### When to use
1818+1919+Ideal for search-as-you-type interfaces against reasonably sized or indexed datasets. Pair with server-side indexing for larger collections.
+16
src/articles/content/filters.md
···11+## Submitted filter prefetch
22+33+Filter-based prefetching improves search experiences by preloading results when a filter form is submitted. Instead of waiting for the filter to be applied after submission, data is already being fetched as the form processes.
44+55+### How it works
66+77+1. The user enters filter criteria in the form fields
88+2. The form is submitted, updating search parameters in the URL
99+3. React Query prefetches results for the new parameter set
1010+4. Results render with minimal loading time
1111+1212+### Key considerations
1313+1414+- **URL-driven state**: Filters are stored in search params, making them shareable and bookmarkable
1515+- **Cache management**: Each filter combination creates a unique cache entry with its own `staleTime`
1616+- **Type safety**: Valibot validates search params at the route boundary, ensuring the filter state is always valid
+18
src/articles/content/intent-preloading.md
···11+## Intent-based preloading
22+33+Intent preloading takes route-level prefetching further by triggering data fetches on hover and focus events. This creates a near-instant experience — data begins loading the moment the user shows intent to navigate.
44+55+### How it works
66+77+1. The user hovers over or focuses a navigation link
88+2. The `prefetch="intent"` directive triggers the route's loader
99+3. Data is fetched and cached before the click completes
1010+4. On click, the page renders immediately with zero loading time
1111+1212+### Why intent matters
1313+1414+Unlike viewport-based preloading which can trigger fetches for links the user may never click, intent preloading only fires when the user explicitly shows interest in a link. This balances performance gains with bandwidth efficiency.
1515+1616+### Configuration
1717+1818+Set `prefetch="intent"` on `Link` components or configure it as the default for specific routes in your router configuration.
+18
src/articles/content/live-query-filters.md
···11+## Reactive filtered live search
22+33+Combining live queries with client-side filtering creates a real-time search experience. The full dataset stays in sync with the server while the client filters and displays results reactively as the user types.
44+55+### How it works
66+77+1. A live query fetches the full dataset and keeps it in sync
88+2. Client-side filtering narrows results based on user input
99+3. Results update immediately with every keystroke
1010+4. Underlying database changes are reflected in real time
1111+1212+### Architecture
1313+1414+Electric SQL handles the server-to-client sync layer, while TanStack DB collections manage live query subscriptions. Client-side filtering provides instant feedback without additional network requests, and URL search params keep the filter state shareable.
1515+1616+### Best for
1717+1818+Dashboards, monitoring interfaces, multi-user collaboration tools, and any application where data freshness takes priority over raw query throughput.
+20
src/articles/content/live-query.md
···11+## Electric SQL synced collection
22+33+Live queries use Electric SQL to keep client-side data in sync with the server database in real time. Instead of polling or manual refetching, database changes are pushed to connected clients automatically.
44+55+### How it works
66+77+1. The client establishes a sync connection to the Electric SQL server
88+2. A live query is defined using the TanStack DB collection API
99+3. When database records change, updates stream to connected clients
1010+4. The UI re-renders automatically with fresh data
1111+1212+### Benefits
1313+1414+- **Real-time updates**: Changes appear immediately without manual refresh
1515+- **Offline support**: Local data remains available during connectivity interruptions
1616+- **Multi-user**: All connected clients see each other's changes in real time
1717+1818+### Trade-offs
1919+2020+Live queries require the Electric SQL sync infrastructure. They introduce additional complexity compared to simple REST fetching but are the right choice for collaborative or real-time applications where data freshness matters.
+18
src/articles/content/pagination.md
···11+## Viewport pagination preload
22+33+Pagination preloading uses the viewport to determine which pages to prefetch. When "next" or "previous" pagination links enter the viewport, the corresponding page's data is preloaded before the user clicks.
44+55+### How it works
66+77+1. Pagination links render with `prefetch="viewport"`
88+2. When a link enters the viewport, the router triggers a prefetch
99+3. Data is cached before the user clicks the navigation button
1010+4. Pagination navigation feels instant
1111+1212+### Why viewport preloading for pagination?
1313+1414+Pagination is a natural fit for viewport-based prefetching. The next and previous buttons are always visible at the bottom of the page, so prefetching them is almost guaranteed to be useful. It strikes an ideal balance between eager and lazy loading.
1515+1616+### Optimization
1717+1818+Combine with `staleTime` to avoid redundant refetches as the user pages back and forth through the data set.
+20
src/articles/content/preloading.md
···11+## Route-level prefetch
22+33+Route-level prefetching improves perceived performance by initiating data fetches before the user reaches the page. When a link enters the viewport or receives focus, TanStack Router fires the route's `loader` function to pre-warm the query cache.
44+55+### How it works
66+77+1. TanStack Router detects that a link is about to be visited
88+2. The route's `loader` calls `prefetchQuery` on the query client
99+3. Data is fetched and cached in React Query's cache
1010+4. When the user clicks, the page renders instantly from cache
1111+1212+### Trade-offs
1313+1414+- **Bandwidth**: May fetch data the user never actually views
1515+- **Freshness**: Cached data needs an appropriate `staleTime`
1616+- **Complexity**: Requires defining loaders and query options per route
1717+1818+### Best practices
1919+2020+Set an appropriate `staleTime` to balance data freshness with cache hits. Use `prefetchQuery` for speculative fetches — it won't throw if the query fails, making it safe for preloading.
···11-export const strategyContent: Record<string, string> = {
22- basic: `## No prefetching (baseline)
33-44-This is the baseline approach — no prefetching whatsoever. Every page navigation triggers a fresh network request, and the user sees loading skeletons while data is fetched on demand.
55-66-### How it works
77-88-1. The user navigates to the page
99-2. React Query fires the fetch request from the component
1010-3. A loading skeleton renders while the query resolves
1111-4. Data arrives and the table renders with results
1212-1313-### Trade-offs
1414-1515-- **Latency**: Every navigation incurs a full server round-trip
1616-- **UX**: Loading skeletons are visible on every page visit
1717-- **Simplicity**: The implementation is the easiest to understand and maintain
1818-1919-### When to use
2020-2121-This pattern works for low-traffic pages, internal tools, or anywhere the performance overhead of a round-trip is acceptable. It is the simplest possible starting point before adding any prefetching strategy.`,
2222-2323- preloading: `## Route-level prefetch
2424-2525-Route-level prefetching improves perceived performance by initiating data fetches before the user reaches the page. When a link enters the viewport or receives focus, TanStack Router fires the route's \`loader\` function to pre-warm the query cache.
2626-2727-### How it works
2828-2929-1. TanStack Router detects that a link is about to be visited
3030-2. The route's \`loader\` calls \`prefetchQuery\` on the query client
3131-3. Data is fetched and cached in React Query's cache
3232-4. When the user clicks, the page renders instantly from cache
3333-3434-### Trade-offs
3535-3636-- **Bandwidth**: May fetch data the user never actually views
3737-- **Freshness**: Cached data needs an appropriate \`staleTime\`
3838-- **Complexity**: Requires defining loaders and query options per route
3939-4040-### Best practices
4141-4242-Set an appropriate \`staleTime\` to balance data freshness with cache hits. Use \`prefetchQuery\` for speculative fetches — it won't throw if the query fails, making it safe for preloading.`,
4343-4444- "intent-preloading": `## Intent-based preloading
4545-4646-Intent preloading takes route-level prefetching further by triggering data fetches on hover and focus events. This creates a near-instant experience — data begins loading the moment the user shows intent to navigate.
4747-4848-### How it works
4949-5050-1. The user hovers over or focuses a navigation link
5151-2. The \`prefetch="intent"\` directive triggers the route's loader
5252-3. Data is fetched and cached before the click completes
5353-4. On click, the page renders immediately with zero loading time
5454-5555-### Why intent matters
5656-5757-Unlike viewport-based preloading which can trigger fetches for links the user may never click, intent preloading only fires when the user explicitly shows interest in a link. This balances performance gains with bandwidth efficiency.
5858-5959-### Configuration
6060-6161-Set \`prefetch="intent"\` on \`Link\` components or configure it as the default for specific routes in your router configuration.`,
6262-6363- pagination: `## Viewport pagination preload
6464-6565-Pagination preloading uses the viewport to determine which pages to prefetch. When "next" or "previous" pagination links enter the viewport, the corresponding page's data is preloaded before the user clicks.
6666-6767-### How it works
6868-6969-1. Pagination links render with \`prefetch="viewport"\`
7070-2. When a link enters the viewport, the router triggers a prefetch
7171-3. Data is cached before the user clicks the navigation button
7272-4. Pagination navigation feels instant
7373-7474-### Why viewport preloading for pagination?
7575-7676-Pagination is a natural fit for viewport-based prefetching. The next and previous buttons are always visible at the bottom of the page, so prefetching them is almost guaranteed to be useful. It strikes an ideal balance between eager and lazy loading.
7777-7878-### Optimization
7979-8080-Combine with \`staleTime\` to avoid redundant refetches as the user pages back and forth through the data set.`,
8181-8282- filters: `## Submitted filter prefetch
8383-8484-Filter-based prefetching improves search experiences by preloading results when a filter form is submitted. Instead of waiting for the filter to be applied after submission, data is already being fetched as the form processes.
8585-8686-### How it works
8787-8888-1. The user enters filter criteria in the form fields
8989-2. The form is submitted, updating search parameters in the URL
9090-3. React Query prefetches results for the new parameter set
9191-4. Results render with minimal loading time
9292-9393-### Key considerations
9494-9595-- **URL-driven state**: Filters are stored in search params, making them shareable and bookmarkable
9696-- **Cache management**: Each filter combination creates a unique cache entry with its own \`staleTime\`
9797-- **Type safety**: Valibot validates search params at the route boundary, ensuring the filter state is always valid`,
9898-9999- "debounced-preload-filters": `## Debounced filter prefetch
100100-101101-Debounced preloading extends filter-based prefetching by initiating fetches on every keystroke — not just on form submission. A debounce window ensures the server is not overwhelmed by rapid-fire requests.
102102-103103-### How it works
104104-105105-1. The user types in the filter input
106106-2. Each keystroke updates the search params after a short debounce delay
107107-3. React Query fires a prefetch for the new parameter values
108108-4. Results update incrementally as the user types
109109-5. The user sees live-filtered results without needing to press submit
110110-111111-### Debounce strategy
112112-113113-The debounce delay balances responsiveness with server load. A 300–400ms window prevents unnecessary intermediate requests while still feeling snappy to the user. TanStack Pacer provides the debouncing primitive.
114114-115115-### When to use
116116-117117-Ideal for search-as-you-type interfaces against reasonably sized or indexed datasets. Pair with server-side indexing for larger collections.`,
118118-119119- "live-query": `## Electric SQL synced collection
120120-121121-Live queries use Electric SQL to keep client-side data in sync with the server database in real time. Instead of polling or manual refetching, database changes are pushed to connected clients automatically.
122122-123123-### How it works
124124-125125-1. The client establishes a sync connection to the Electric SQL server
126126-2. A live query is defined using the TanStack DB collection API
127127-3. When database records change, updates stream to connected clients
128128-4. The UI re-renders automatically with fresh data
129129-130130-### Benefits
131131-132132-- **Real-time updates**: Changes appear immediately without manual refresh
133133-- **Offline support**: Local data remains available during connectivity interruptions
134134-- **Multi-user**: All connected clients see each other's changes in real time
135135-136136-### Trade-offs
137137-138138-Live queries require the Electric SQL sync infrastructure. They introduce additional complexity compared to simple REST fetching but are the right choice for collaborative or real-time applications where data freshness matters.`,
139139-140140- "live-query-filters": `## Reactive filtered live search
141141-142142-Combining live queries with client-side filtering creates a real-time search experience. The full dataset stays in sync with the server while the client filters and displays results reactively as the user types.
143143-144144-### How it works
145145-146146-1. A live query fetches the full dataset and keeps it in sync
147147-2. Client-side filtering narrows results based on user input
148148-3. Results update immediately with every keystroke
149149-4. Underlying database changes are reflected in real time
150150-151151-### Architecture
152152-153153-Electric SQL handles the server-to-client sync layer, while TanStack DB collections manage live query subscriptions. Client-side filtering provides instant feedback without additional network requests, and URL search params keep the filter state shareable.
154154-155155-### Best for
156156-157157-Dashboards, monitoring interfaces, multi-user collaboration tools, and any application where data freshness takes priority over raw query throughput.`,
158158-};