const useLifecycleLogs = () => {
console.log('The component has triggered a re-render')
React.useEffect(() => {
console.log('The component has been mounted')
return () => {
console.log('The component has been unmounted')
}
}, [])
}
function App () {
useLifecycleLogs()
return (
<div />
)
}