- Adding `useEffect` hook to ensure rehydration does not throw an error