I keep getting this warning in my app
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 %s.%s, a useEffect cleanup function, but I’m not sure how else to remove it. I’ve added the useEffect cleanup function as suggested but it’s not working. The weird part is that it also appears on pages that do not utilise useEffect, like a page as simple as a home page with no async function calls involved.
Also, my app doesn’t crash during development, but it crashed i standalone build, only on a particular page. So this got me thinking that this is the cause of the crashes.