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

Summary

Daily offers an embeddable video chat widget, Daily Prebuilt, that includes a built-in chat history feature, ensuring that new participants can view all previous messages upon joining a call. However, when creating custom chat widgets with Daily's API, developers face the challenge of replicating such features. To address this, Daily has developed a method using React's client-side code, particularly a custom React hook called useSharedState, which enables chat history without relying on a database, thus maintaining HIPAA compliance. This approach involves a system where new participants can request chat history from random existing participants, ensuring the chat is up-to-date. The tutorial highlights the use of Daily's sendAppMessage method and provides a detailed breakdown of the process, illustrating how to implement and utilize the custom hook for sharing any state within Daily calls. Additionally, resources are provided for further development of chat widgets using Daily's API.