I am using Flash Message in React Native. A memory leak error is thrown when I navigate to another screen without waiting for the message to disappear.
Code
showMessage({
message: "Hello World",
duration: 2000,
description: "This is our second message",
type: "success",
});
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 %s.%s, the componentWillUnmount method,