Skip to content

Commit

Permalink
Clarify useDataChannel callback docs (#889)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasIO authored Jun 7, 2024
1 parent 9735878 commit d4d8add
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react/src/hooks/useDataChannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type UseDataChannelReturnType<T extends string | undefined = undefined> = {
* @example
* ```tsx
* // Send messages to all participants via the 'chat' topic.
* const { message, send } = useDataChannel('chat');
* const { message: latestMessage, send } = useDataChannel('chat', (msg) => console.log("message received", msg));
* ```
* @public
*/
Expand All @@ -38,7 +38,7 @@ export function useDataChannel<T extends string>(
* @example
* ```tsx
* // Send messages to all participants
* const { message, send } = useDataChannel(callback);
* const { message: latestMessage, send } = useDataChannel('chat', (msg) => console.log("message received", msg));
* ```
* @public
*/
Expand Down

0 comments on commit d4d8add

Please sign in to comment.