I am getting this error, using xcode 13, RN 64.2, @react-navigation/stack": "5.0.0-alpha.71"
Any ideas how I can fix it?
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 the componentWillUnmount method.
in StackView (at createStackNavigator.tsx:69)
in StackNavigator (at RootStackNavigator.js:29)
in RootStackNavigator (at AppRootStack.js:16)
RootStackNavigator:
import React from 'react';
import PropTypes from 'prop-types';
import { createStackNavigator } from '@react-navigation/stack';
...
... const RootStack = createStackNavigator();
const RootStackNavigator = ({
...
}) => {
if (!isLoggedIn) {
return (
<RootStack.Navigator. << line 29
initialRouteName={AppRoutes.LoginRegistration.Name}
mode="modal"
>
<RootStack.Screen
name={AppRoutes.LoginRegistration.Name}
component={LoginRegistrationScreen}
options={{
title: AppRoutes.LoginRegistration.Label,
headerShown: false,
animationEnabled: false,
}}
/>