Frontend Development 5 min read

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.

Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
How LINE Manga Achieves Native‑Like Page Transitions with a Page Stack

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.

UINavigationController diagram
UINavigationController diagram

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

PageStack

container. Modals are also managed via a stack.

PageStack HTML diagram
PageStack HTML diagram

JavaScript Implementation (React & react‑router)

The implementation uses React components and a custom

withStack

higher‑order component to push and pop pages on the stack.

PageStack component diagram
PageStack component diagram
Wrapper page diagram
Wrapper page diagram
Helper withStack diagram
Helper withStack diagram

Usage Example

Developers can wrap their routes with the

PageStack

component and use

push

and

pop

methods to navigate without triggering full page reloads.

Usage code example
Usage code example

Result

After integrating the Page Stack, page transitions become extremely smooth, matching native app performance.

Smooth transition demo
Smooth transition demo

Scrolling also remains fluid without visual jumps.

Scrolling demo
Scrolling demo

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.

frontendJavaScriptReactweb performanceStackpage transition
Tencent IMWeb Frontend Team
Written by

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.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.