Company
Date Published
Author
Jess Mitchell
Word count
2108
Language
English
Hacker News points
None

Summary

The text discusses the implementation of a feature that allows users to view the chat history in a custom Daily chat widget. The feature is built using client-side React code and leverages the `sendAppMessage` method provided by the Daily API. When a new participant joins a call, they can request the chat history from another participant who has already been present, and this request is broadcast to all participants in the call. Once the state is received, it is stored locally by each participant and displayed in the UI. The feature ensures that HIPAA-compliant calls remain compliant even with chat turned on. A custom React hook called `useSharedState` is introduced to achieve this functionality, which can be used in other frameworks as well.