Skip to content

非公式 / UnofficialCloudflare, Inc. 非提携。アカウント情報は入力しないでください。Not affiliated with Cloudflare, Inc. Do not enter Cloudflare credentials here.Official docsこのサイトについてプライバシー

RtkPoll

最終更新 Markdown で表示Agent セットアップ

質問、投票可能な選択肢、投票数、投票者のアバターを含む、1 件の投票を描画します。

プロパティ

プロパティ 型 必須 デフォルト 説明
poll Poll ✅ - 表示する Poll オブジェクト
meeting RealtimeKitClient ✅ - RealtimeKit のミーティングインスタンス
onRtkVotePoll any ❌ - 投票時のコールバック(選択肢のインデックスを受け取ります)
self string ❌ - 自分のユーザー ID
iconPack IconPack ❌ defaultIconPack カスタムアイコンパック
t RtkI18n ❌ - i18n 翻訳関数

使用例

基本的な使い方

import { RtkPoll } from "@cloudflare/realtimekit-react-native-ui";

function MyComponent() {
	return <RtkPoll poll={poll} meeting={meeting} />;
}

プロパティを指定する場合

import { RtkPoll } from "@cloudflare/realtimekit-react-native-ui";

function MyComponent() {
	return (
		<RtkPoll
			poll={poll}
			meeting={meeting}
			onRtkVotePoll={(index) => handleVote(index)}
			self={selfUserId}
		/>
	);
}

役に立ちましたか?