await stream.react('❤️');
stream.chat.on('reactionAdded', (event) => {
console.log(event.userId, event.emoji);
});import { useLiveStream } from '@corvidhq/react';
const { react } = useLiveStream();
<button onClick={() => react('❤️')}>❤️</button>Available from useLiveStream() on both host and viewer — there's no
separate reaction hook.
await stream.react('❤️');await stream.react('❤️');There's no separate "stream reaction" system. stream.react() adds a
Chat reaction to the stream's hidden system root
message (chatRootMessageId) — the same idempotent,
grouped-per-emoji model documented there. A double-tapped reaction is a
no-op, not a duplicate, for the same reason a double-tapped reaction on
an ordinary message is.
Requirements
stream.react() throws if the stream was joined without chat
credentials, or if it has chat but no chatRootMessageId — both are
programmer-error conditions (missing/incomplete join credentials), not
things a normal integration should hit once
LiveStream.join() is wired up correctly
with the credentials the create/token endpoints return.
Reading current reaction counts
Reactions aggregate exactly like they do on any message — see
Chat → Reactions for the grouped
shape ({ emoji, count, userIds }).