A custom React hook for determining if a component has mounted for client-side vs server-side rendering.