Skip to content

6.2: Implement Streaming for Comments #97

@justin808

Description

@justin808

Overview

Enable RSC streaming for comment loading on story detail pages.

Parent Epic: #70
Priority: P1

Prerequisites

Next Issues (after this is complete)

  • 7.3: Write Integration Tests (verify streaming behavior)

Acceptance Criteria

  • Comments load progressively (don't block story details)
  • Deep comment threads handled efficiently
  • Suspense boundaries wrap comment tree
  • Comment skeletons show during loading
  • Story header/details visible before comments load

Implementation Notes

Comments are often the slowest part of HN pages due to:

  1. Many nested API calls for child comments
  2. Deep recursion in comment trees

Streaming allows the story details to appear immediately while comments load in the background.

Consider wrapping comment tree in Suspense:

<Suspense fallback={<CommentTreeSkeleton />}>
  <CommentTree comments={comments} />
</Suspense>

Metadata

Metadata

Assignees

No one assigned

    Labels

    HN-RSCHacker News RSC DemoRSCReact Server Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions