-
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
| Name |
Last commit
|
Last update |
|---|---|---|
| .github | ||
| cmd/memos | ||
| internal | ||
| plugin | ||
| proto | ||
| scripts | ||
| server | ||
| store | ||
| web | ||
| .dockerignore | ||
| .gitignore | ||
| .golangci.yaml | ||
| CLAUDE.md | ||
| CODEOWNERS | ||
| LICENSE | ||
| README.md | ||
| SECURITY.md | ||
| go.mod | ||
| go.sum |