Create reusable custom React hooks with proper TypeScript typing and comprehensive documentation.
I need a custom React hook for the following functionality. **Hook Purpose:** [Describe what the hook should do] **Input Parameters:** [List expected parameters] **Expected Return Values:** [List what the hook should return] **Side Effects:** [Describe any side effects like API calls, subscriptions, etc.] **Example Usage:** ```jsx // How you want to use the hook [describe ideal usage pattern] ``` **Requirements:** - TypeScript: [yes/no] - SSR compatible: [yes/no] - Cleanup handling: [describe needs] - Error handling: [describe needs] Please provide: 1. Complete hook implementation 2. TypeScript types/interfaces 3. JSDoc documentation 4. Usage examples 5. Unit tests 6. Edge case handling
Or press ⌘C to copy