A type representing a function that performs an asynchronous side effect.
The function receives a function that returns a boolean indicating whether the component is currently mounted.
It should return a promise that resolves to a cleanup function or void.
A type representing a function that performs an asynchronous side effect. The function receives a function that returns a boolean indicating whether the component is currently mounted. It should return a promise that resolves to a cleanup function or void.