Expand your knowledge base with the help of IDNLearn.com's extensive answer archive. Our platform provides prompt, accurate answers from experts ready to assist you with any question you may have.

In the context of React development, what is the recommended approach to resolve the issue of "can't perform a react state update on an unmounted component" and prevent potential memory leaks?
A) Use 'componentDidUpdate' to handle state updates.
B) Implement error boundaries to catch unmounted component errors.
C) Cancel all subscriptions and asynchronous tasks in a 'useEffect' cleanup function.
D) Increase the 'timeout' setting for asynchronous tasks.