useWindowedSubscription
Subscribe to only the visible viewport of a huge table — live and bounded.
For a huge table, subscribe to only the visible viewport (offset+limit from scroll); the server pushes deltas only for in-window rows — live AND bounded.
const w = useWindowedSubscription('app', 'rows.list', { rowHeight: 32, viewportHeight: 480, total })
<div style={{ height: 480, overflow: 'auto' }} onScroll={w.onScroll}>
<div style={{ height: w.topSpacer }} />
{w.rows.map(/* … */)}
<div style={{ height: w.bottomSpacer }} />
</div>