Skip to content

not working with @react-navigation/bottom-tabs|| if stack.navigator is a tab.sceen. shareelement won't work #223

Open

Description

@jameszhan02

i am useing expo dev-client. app was working fine with @react-navigation/stack, after change to react-navigation-shared-element, problem appear.

Activity

  1. jameszhan02 commented on Jan 15, 2022

    @jameszhan02
    Author

    and i try to log out the route.params, but nothing on console. seems like some how params wasnt pass to second screen

        <Stack.Navigator
          screenOptions={{
            useNativeDriver: true,
            headerShown: false,
        >
          <Stack.Screen name="List" component={ViewPosts} />
          <Stack.Screen
            name="Detail"
            component={postDetail}
            sharedElements={(route) => {
              console.log("call back: ", route.params.item.id);
              return [route.params.item.id];
            }}
          />
        </Stack.Navigator>
  2. jameszhan02 commented on Jan 15, 2022

    @jameszhan02
    Author
     const postOnClick = () => {
        console.log("card: ", item);
        navigation.navigate("Detail", { item });
      };

    here i pass the post as params in to second screen

  3. jameszhan02 commented on Jan 15, 2022

    @jameszhan02
    Author
    function postDetail({ route }) {
      const { item } = route.params;
      console.log("in detail info: ", item);

    and over here, in my postDetail component. nothing log out.

  4. changed the title [-]App not respond after navigate to another stack screen[/-] [+]not working with @react-navigation/bottom-tabs|| if stack.navigator is a tab.sceen. shareelement won't work[/+] on Jan 15, 2022
  5. hamzaahzam commented on Feb 1, 2022

    @hamzaahzam

    This issue has already been closed see the work flow of this answer #77

  6. darias08 commented on Dec 4, 2022

    @darias08

    I am still having issue getting the bottom-tab navigator to work with sharedElement. It's exactly like this person video that mentioned it.

    https://streamable.com/nigj5q

    Whenever I transition to a different screen from the bottom tab navigator and navigate back to the screen that has the sharedElement. It wouldn't do the animations. How can I fix this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions