You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know the Issue #15006 is still open but the described problem is not fit in my case.
I have to check the User is Login? using AWS Cognito function in the private route. I can't use the cleanup function because before the callback executes I redirect to my login page.
here is some of the code Privateroute.js (problem in this code)
The posted code looks correct to me as well. With promises, you always need to do some sort of check to make sure its still safe to update the state on your component.
I can't use the cleanup function because before the callback executes I redirect to my login page.
This shouldn't be true. When you go to "/" your component will still call the PrivateRoute useEffect cleanup. You can test this by adding a breakpoint, to that particular line (or a debugger/console.log call).
I know the Issue #15006 is still open but the described problem is not fit in my case.
I have to check the User is Login? using AWS Cognito function in the private route. I can't use the cleanup function because before the callback executes I redirect to my login page.
here is some of the code
Privateroute.js (problem in this code)
if I removed the mounted check I received the memory leak warning
code to check the is user login
call to private route
The text was updated successfully, but these errors were encountered: