stream-chat-react-native icon indicating copy to clipboard operation
stream-chat-react-native copied to clipboard

messaging app (SampleApp) navigation.goBack not defined when creating a new group

Open Agupta00 opened this issue 3 years ago • 2 comments

Hello, Please see the attached video below of the bug I described.

The problem is when you go "New Group" -> "Name the Group" -> "Back Button", you get an error since navigation.goBack(); in ScreenHeader.tsx does not have anything to go back to.

The expected behavior would be that it does / when you are back on the home screen you should be able to navigate to other chats, which you are not able to do.

If there is a quick fix, please do let me know, thanks! As a quick hack, I have tried to add this but it didn't work.

        if (!navigation.canGoBack()) {
          navigation.reset({
            index: 0,
            routes: [
              {
                name: 'HomeScreen',
              },
            ],
          });
        } else {
          navigation.goBack();
        }

Error: ERROR The action 'GO_BACK' was not handled by any navigator.

https://user-images.githubusercontent.com/12666226/174914438-789d41f9-bf8a-42e8-b9ef-70cc4ac3687a.mov

Agupta00 avatar Jun 21 '22 23:06 Agupta00

@Agupta00 thanks for reaching out. We have added this to our low-prio backlog. Follow this issue to stay posted!

vanGalilea avatar Nov 14 '22 12:11 vanGalilea

/attempt #1506

Vrunalbenke avatar Nov 29 '23 12:11 Vrunalbenke