DEV Community

HarmonyOS
HarmonyOS

Posted on

The router.replaceUrl Method Does Not Provide an Alternative to the Animation Effect

Read the original article:The router.replaceUrl Method Does Not Provide an Alternative to the Animation Effect

Question

When router.replaceUrl is used to jump to the interface, the transition animation on the interface does not work.

How can I make the transition animation play smoothly on the redirection interface?

Short Answer

router.replaceUrl does not support transition animations and the Router API is deprecated.

To implement smooth page transitions, use the Navigation component, which supports interactive transition animations

Applicable Scenarios

  • When migrating from Router to Navigation in HarmonyOS NEXT.
  • When developers need transition animations between pages.
  • When building apps with modern navigation architecture instead of legacy Router.

Reference Link

HarmonyOS Navigation Component

Written by Kayra Enez Ozenalp

Top comments (0)