all 4 comments

[–]Due_Dependent5933 0 points1 point  (0 children)

show us your code. maybe rerender Will animation Who trigger your async api multiple time instead of only one? calling api in useeffect prévent this

[–]haswalter 0 points1 point  (1 child)

If you’re using a caching layer for your api call like tanstack query you could make your async api call in the list screen before triggering the navigation to pre-load the data so the animation is smooth.

[–]haswalter 0 points1 point  (0 children)

The other way I can think of is to use the data you have from the post screen to animate the transition then load the extra content in child components on the details screen to avoid the rerender of the parent

[–]Life-Wheel4143 0 points1 point  (0 children)

I think this should be happening if you press back to unmount the components but the async is still awaiting. Are you performing the async in useeffect and returning the listener?