Show HN: UX-demo Seamless scroll restoration for infinite lists in Web apps(suhaotian.github.io) Most SPA infinite scrolls break the "Back" button—users click a post, hit back, and lose their position. Many devs switch to pagination just to avoid this headache, even when infinite scroll offers a better UX. This demo shows a "Save and Restore" approach that makes web lists feel native: * State Persistence: Caches currently loaded records and the scroll offset before navigation. * Instant Hydration: On back-navigation, it checks for cached state to re-render the list immediately. * Precise Restoration: Snaps the user back to their exact scroll position without layout shift. Demo: https://suhaotian.github.io/broad-infinite-list/?demo=news I'd love to hear how you all handle this in your apps. |
No comments yet