[Problem/Question]
I am receiving a warning in my react native app when navigation out from the GroupChannelFragment
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.
in Unknown (at Chat.tsx:137)
ERROR Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.
in VideoFileMessage (at GroupChannelMessageRenderer/index.tsx:167
Here is my Chat component
function Chat() {
const {sdk} = useSendbirdChat();
const {channel} = useGroupChannel(sdk, params.channelUrl);
return <GroupChannelFragment
channel={channel}
keyboardAvoidOffset={headerHeight}
onChannelDeleted={() => {
// Navigate to GroupChannelList function.
}}
onPressHeaderLeft={() => {
navigation.goBack();
}}
onPressHeaderRight={() => {
// Navigate to Settings
}}
/>
}