How LINE Manga Achieves Native‑Like Page Transitions with a Page Stack
This article explains how LINE Manga uses a custom Page Stack architecture, inspired by iOS UINavigationController, to deliver native‑like, smooth page transitions in a web environment, addressing back‑button latency, scroll restoration, and lazy‑load image issues with practical React/React‑Router examples.
Introduction
LINE Manga provides a fluid comic‑reading experience inside the LINE app. To make page navigation feel as smooth as a native app, the team built a custom Page Stack mechanism that avoids full DOM replacement during navigation.
Web Page Issues
Typical SPA routers replace the entire DOM when navigating, which causes noticeable delay when returning to a long, complex home page, loses the previous scroll position, and forces lazy‑loaded images to reload. These problems break the illusion of a native experience.
Reference iOS Implementation
The solution draws inspiration from iOS UINavigationController , which manages view controllers with a navigation stack, using push and pop operations without destroying the underlying views.
Page Stack Implementation
By applying the same stack concept to web pages, LINE Manga eliminates DOM replacement during navigation, solving the latency, scroll‑position, and image‑reload issues.
HTML Structure
The page hierarchy places each view inside a
PageStackcontainer. Modals are also managed via a stack.
JavaScript Implementation (React & react‑router)
The implementation uses React components and a custom
withStackhigher‑order component to push and pop pages on the stack.
Usage Example
Developers can wrap their routes with the
PageStackcomponent and use
pushand
popmethods to navigate without triggering full page reloads.
Result
After integrating the Page Stack, page transitions become extremely smooth, matching native app performance.
Scrolling also remains fluid without visual jumps.
Conclusion
To achieve a native‑like user experience, LINE Manga relies heavily on the Page Stack architecture, which resolves back‑button latency, scroll‑position restoration, and lazy‑load image flicker, delivering a seamless comic‑reading interface.
Tencent IMWeb Frontend Team
IMWeb Frontend Community gathering frontend development enthusiasts. Follow us for refined live courses by top experts, cutting‑edge technical posts, and to sharpen your frontend skills.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.