diff --git a/docusaurus/docs/reactnative/basics/troubleshooting.mdx b/docusaurus/docs/reactnative/basics/troubleshooting.mdx index 1020282d1a..af8a2d990f 100644 --- a/docusaurus/docs/reactnative/basics/troubleshooting.mdx +++ b/docusaurus/docs/reactnative/basics/troubleshooting.mdx @@ -246,6 +246,17 @@ dependencies { } ``` +## Blank screen when channel gets delete + +When a channel is deleted, and if some user is active on that channel, a blank screen appears by default (as per the default logic) as we return `null` in this case. It might be confusing for end user to see a blank screen and appropriate UX would be to navigate back to channel list screen. You can implement such UX by listening to `channel.deleted` event on channel screen, and navigate to channel list screen with appropriate notification on app. + +````tsx +client.on('channel.deleted', (event) => { + if (event.cid === channel.cid) { + // add your action here + } +}), + ## Touchables not working If you are having trouble with pressing, swiping, or otherwise interacting with components it is likely the result of [React Native Gesture Handler](https://docs.swmansion.com/react-native-gesture-handler/docs/) not being properly setup. @@ -255,7 +266,7 @@ This includes ensuring you import `react-native-gesture-handler` at the top of y ```tsx import 'react-native-gesture-handler'; -``` +```` And for Android you additionally need to update `MainActivity.java` to override the method for creating the `ReactRootView`.