react-navigation-shared-element icon indicating copy to clipboard operation
react-navigation-shared-element copied to clipboard

[v5] Nested navigation within TabBar and two initial screens navigating the same destination screen

Open sbkl opened this issue 4 years ago • 6 comments

Hi

I have TabStack and the SharedElementStack.

I want to trigger the same navigation from two different screen from the tab stack.

The first screen works great. However, as soon as I trigger the navigation from the second screen, the navigation breaks when going back, the sharedElements function is not called anymore.

Below a snack reproducing my implementation and the issue I'm facing:

snack demo

Is it something I'm doing wrong or just because it is a prerelease for the v3 and will be fixed later on? Does that work using the latest version of this package with react navigation v4?

Thanks.

sbkl avatar Jun 04 '20 03:06 sbkl

Same issue with @react-navigation/material-top-tabs

miklschmidt avatar Jul 10 '20 11:07 miklschmidt

Was anyone able to fix this issue? Im dealing with the same

s-rayed avatar Oct 15 '20 02:10 s-rayed

Same issue with @react-navigation/material-top-tabs @miklschmidt did you found a solution?

razvanbretoiu avatar Nov 04 '20 21:11 razvanbretoiu

Same issue with @react-navigation/material-top-tabs @miklschmidt did you found a solution?

Unfortunately not, i haven't had the time to look into it thoroughly.

miklschmidt avatar Nov 04 '20 22:11 miklschmidt

@razvanbretoiu I ended up removing the top tab navigator and used a custom ui component, but you can just as easily replace with a tabs component from native base which I believe uses react native swipeable tabs. I realized its actually a bit overkill to nest another navigator just for the top bar navigation. The props on the tabs component more than suffice for most use cases, hopefully for yours as well.

s-rayed avatar Nov 04 '20 22:11 s-rayed

Bummer, we use @react-navigation/material-top-tabs so that we can deep link our users to different tabs. We're about to add a second news feed alongside our main feed and they will both live under a tab navigator, so our shared element transitions are going to break.

dandre-hound avatar Nov 05 '20 16:11 dandre-hound