How david-fernando/medium-posts-card works
Medium Posts Card is a React library for fetching Medium articles and displaying them as a carousel or list, with optional server-side prefetched data. The principal workflow is username → article retrieval → component rendering; callers can instead prefetch with fetchMedium and pass the result with SSR enabled. The README also documents Label as a wrapper for either display. Edges reflect the README and source-index references plus the shown excerpts; unsampled implementation details are not inferred.
Main entry points: Carousel.tsx Carousel · List.tsx Article List · index.tsx Library Exports · Label.tsx Label Wrapper
Components 16
Public API
- Library Exports
src/index.tsx - Component Props
src/interface/interface.ts
Article Retrieval
- Fetch Articles
src/utils/fetchMedium.ts - Load Articles
src/hooks/useGetMedium.tsx
Article Displays
- Carousel
src/components/Carousel.tsx - Article List
src/components/List.tsx - Label Wrapper
src/components/Label.tsx - Carousel Card
src/components/Card.tsx - List Card
src/components/RectangularCard.tsx
Rendering Support
- Carousel Movement
src/hooks/useCarousel.tsx - Card Visibility
src/hooks/useIsVisible.tsx - Last Card Ref
src/hooks/useLastCard.tsx - Array Check
src/hooks/useArray.tsx - Tag Formatting
src/hooks/useBlankSpace.tsx
Other components
- Site Author
- Medium Posts API
Connections 27
- Site Author → Library Exports: uses components
README.md - Site Author → Fetch Articles: prefetches articles
README.md - Library Exports → Carousel: exports
src/index.tsx - Library Exports → Article List: exports
src/index.tsx - Library Exports → Label Wrapper: exports
src/index.tsx - Library Exports → Fetch Articles: exports
src/index.tsx - Carousel → Component Props: uses props
src/components/Carousel.tsx - Article List → Component Props: uses props
src/components/List.tsx - Label Wrapper → Component Props: uses props
src/components/Label.tsx - Carousel → Load Articles: loads articles
src/components/Carousel.tsx - Article List → Load Articles: loads articles
src/components/List.tsx - Load Articles → Fetch Articles: fetches articles
src/hooks/useGetMedium.tsx - Fetch Articles → Medium Posts API: requests articles
src/utils/fetchMedium.ts - Carousel → Carousel Card: renders cards
src/components/Carousel.tsx - Article List → List Card: renders cards
src/components/List.tsx - Label Wrapper → Carousel: wraps component
README.md - Label Wrapper → Article List: wraps component
README.md - Carousel → Carousel Movement: moves position
src/components/Carousel.tsx - Carousel → Card Visibility: checks visibility
src/components/Carousel.tsx - Carousel → Last Card Ref: sets last ref
src/components/Carousel.tsx - Carousel Card → Array Check: checks tags
src/components/Card.tsx - Carousel Card → Tag Formatting: formats tags
src/components/Card.tsx - List Card → Array Check: checks tags
src/components/RectangularCard.tsx - List Card → Tag Formatting: formats tags
src/components/RectangularCard.tsx - Load Articles → Array Check: checks data
src/hooks/useGetMedium.tsx - Site Author → Carousel: supplies prefetched data
README.md - Site Author → Article List: supplies prefetched data
README.md