Event Callbacks
Every lifecycle and user-action hook the widget fires, mirrored live in an event log. Handy for wiring analytics, audit trails, or custom submission gates.
Tenant · demoEvents · 0
Event log
> waiting for events...
app/callbacks/page.tsx
'use client';
import { FastComments } from 'fastcomments-nextjs';
export default function CallbacksPage() {
return (
<FastComments
tenantId="demo"
urlId="nextjs-demo-callbacks"
onInit={() => console.log('onInit')}
onRender={() => console.log('onRender')}
onCommentsRendered={(c) => console.log('rendered', c.length)}
commentCountUpdated={(n) => console.log('count', n)}
onAuthenticationChange={(e, d) => console.log(e, d)}
onReplySuccess={(c) => console.log('reply', c)}
onVoteSuccess={(c, id, dir) => console.log('vote', dir)}
onCommentSubmitStart={(c, next) => next()}
/>
);
}