streamich / react-use

React Hooks — 👍
http://streamich.github.io/react-use
The Unlicense
42k stars 3.16k forks source link

feat: add new hook: useBroadcastChannel #2559

Open TransonQ opened 6 months ago

TransonQ commented 6 months ago

Description

This PR adds a new React hook: useBroadcastChannel. This hook allows the usage of the Broadcast Channel API in the application to send and receive messages. It can be used for communication within the same browser tab or between different tabs. This new feature is designed to provide a simple and reliable way to achieve browser communication, meeting the needs of certain scenarios such as synchronizing state across multiple tabs or real-time updates.

Type of change

Checklist

Kumar06Lav commented 3 months ago

Hi team, I'd like to take on this issue. Could you please assign it to me? Thanks!