Let’s say I have a page that uses
useStreamQueries to read and live-update contracts in a table. If I want to display a notification every time a new contract arrives, is there anything in
daml-react that allows me to hook into this event elegantly?
The only alternative I can think of is to keep parent state in my component of all the contracts that have been loaded previously, and diff that on every re-render with the current list of contracts returned from
useStreamQueries. But this seems heavy-handed and cumbersome for a seemingly simple task. Any ideas on how to best approach this?