Redirect on Login


From @jayair on Mon Apr 10 2017 01:08:29 GMT+0000 (UTC)

Link to chapter -

Copied from original issue:


Getting this warning, and I don’t see any async in UnathenticatedRoute

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 Login (at UnauthenticatedRoute.js:27)


This means that there is a setState getting called after the component has been unmounted. On which step of the chapter are you seeing this?


I’ve implemented the “Redirect on login” code… I get that warning when I log in (from logged out state). Enter email/password, click log in, spins while loading, and then I get that warning right before it navigates home.


Did you remove this line as it talks about in the chapter?