Back to Demo
Sample Article
This is a demonstration of how the polymorphic comment system works on articles. The same component can be used on any content type with just two props.
Entity Type: ARTICLE
Entity ID: cmd8necnc0006rs5kfxne3uhr
Article Comments
Try creating, editing, and replying to comments. Notice how the same system works across different content types. This demonstrates true polymorphic behavior.
Implementation Example
// Just two lines to add comments to any page
<Comments entity="ARTICLE" entityId={article.id} />
// Works with any entity type - same component!
<Comments entity="EPISODE" entityId={episode.id} />
<Comments entity="PRODUCT" entityId={product.id} />
<Comments entity="POST" entityId={post.id} />
// The system automatically handles:
// ✅ Loading comments for the specific entity
// ✅ User authentication and permissions
// ✅ Creating, editing, and deleting comments
// ✅ Threaded replies with infinite depth
// ✅ Real-time updates with Server ComponentsSystem Features
Polymorphic Comments
Attach to any entity type
Same component, different contexts
Type-safe with TypeScript
Threaded Replies
Nested comment threads
Infinite depth support
Efficient loading