As a newcomer to react native, I find myself struggling with figuring out which objects need to be cleaned up before a component unMount. I understand that API calls should be cleaned, but what else? For example, if I have a button like this:
const _renderTruncatedFooter = (handlePress) => {
return (
<Text
onPress={handlePress}>
Read more
</Text>
);
};
Is it necessary to cleanup buttons in the useEffect return?