Using @daml/ledger with React Class Components

Hi @alex_m,
I think you would have to write a class that maintains its own ledger object and also the state of the stream. Basically you would have to re-implement the useStreamQuery function like here as a class component. In that piece of code you also see how ledger.streamQuery is used.

I hope that helps!

1 Like