From 39d526ced03b419fa14369c2b2ad5d3946a6ee91 Mon Sep 17 00:00:00 2001 From: yassinedorbozgithub Date: Wed, 29 Jan 2025 10:12:16 +0100 Subject: [PATCH] fix: apply feedback updates --- widget/src/hooks/useBroadcastChannel.ts | 30 ------------------------- 1 file changed, 30 deletions(-) diff --git a/widget/src/hooks/useBroadcastChannel.ts b/widget/src/hooks/useBroadcastChannel.ts index d20151a7..32172c31 100644 --- a/widget/src/hooks/useBroadcastChannel.ts +++ b/widget/src/hooks/useBroadcastChannel.ts @@ -23,18 +23,6 @@ export type BroadcastChannelData = * @param handleMessage Callback to handle the event generated when `message` is received. * @param handleMessageError [optional] Callback to handle the event generated when `error` is received. * @returns A function to send/post message on the channel. - * @example - * ```tsx - * import {useBroadcastChannel} from 'react-broadcast-channel'; - * - * function App () { - * const postUserIdMessage = useBroadcastChannel('userId', (e) => alert(e.data)); - * return (); - * } - * ``` - * --- - * Works in browser that support Broadcast Channel API natively. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API#browser_compatibility). - * To support other browsers, install and use [broadcastchannel-polyfill](https://www.npmjs.com/package/broadcastchannel-polyfill). */ export function useBroadcastChannel( channelName: string, @@ -63,24 +51,6 @@ export function useBroadcastChannel( * @param channelName Static name of channel used across the browser windows. * @param initialState Initial state. * @returns Tuple of state and setter for the state. - * @example - * ```tsx - * import {useBroadcastState} from 'react-broadcast-channel'; - * - * function App () { - * const [count, setCount] = useBroadcastState('count', 0); - * return ( - *
- * - * {count} - * - *
- * ); - * } - * ``` - * --- - * Works in browser that support Broadcast Channel API natively. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API#browser_compatibility). - * To support other browsers, install and use [broadcastchannel-polyfill](https://www.npmjs.com/package/broadcastchannel-polyfill). */ export function useBroadcastState( channelName: string,