i am using @react-navigation/stack^5.14.4
and @react-navigation/native^5.9.4
, to handle the scene transition between Home, Login and Profile pages.
there are 2 transition cases i need to handle:
- Home -> Profile (should have animation enabled)
- Login -> Profile (need to skip the animation)
the reason why to skip the animation is that I am using a loading skeleton similar to the layout of Profile page during the login process. It is weird to have a transition between the profile page content and the skeleton itself. However I want to keep the awesome animation if pushed from Home page.
Is there a simple solution like
navigation.replace("Profile"); // with animation
navigation.replace("Profile", { animationEnabled: false }); // skip animation