streamich / react-use

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

feat: add new hook: useBroadcastChannel #2559

Open TransonQ opened 4 months ago

TransonQ commented 4 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 1 month ago

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