TECHAFFINITY interview question

How do you handle unmount phase in React Functional component?