• Johnny's avatar
    refactor(MemoView): improve maintainability and code organization · e61d594d
    Johnny authored
    Complete refactoring of MemoView components for better code quality:
    
    - Split useMemoViewState into individual hook files (useMemoActions,
      useKeyboardShortcuts, useNsfwContent, useImagePreview, useMemoCreator)
      for single responsibility principle
    - Consolidate types closer to usage - move hook-specific types to
      respective files, keep only component props in shared types.ts
    - Optimize context with separate static/dynamic memoization to reduce
      unnecessary re-renders
    - Simplify barrel exports to only expose public API (MemoView component
      and MemoViewProps type)
    - Add comprehensive JSDoc documentation to all public APIs with usage
      examples
    
    Benefits:
    - Better maintainability: each hook file has one clear purpose
    - Improved performance: context optimization prevents unnecessary re-renders
    - Enhanced developer experience: clear documentation and encapsulation
    - Cleaner architecture: public API is minimal, internal details hidden
    
    All automated checks pass (TypeScript compilation, linter, production build).
    e61d594d
index.ts 105 Bytes