GetStream / stream-chat-react-native

💬 React-Native Chat SDK ➜ Stream Chat. Includes a tutorial on building your own chat app experience using React-Native, React-Navigation and Stream
https://getstream.io/chat/sdk/react-native/
Other
968 stars 323 forks source link

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

Open Agupta00 opened 2 years ago

Agupta00 commented 2 years ago

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

vanGalilea commented 1 year ago

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

Vrunalbenke commented 10 months ago

/attempt #1506