Instruction: Explain how to create and use custom React hooks in Next.js for managing application state.
Context: This question examines the candidate's proficiency with React hooks and their ability to extend these concepts specifically within a Next.js application for state management.