Error: Trying to use DamlLedgerContext before initializing

Hi,

We are trying to integrate DAML with React application. While we do that getting the attached error. Does anybody faced the same issue ?

Looking forward some suggestion. Thanks in advance.

Regards,
Palani

1 Like

Hi @palanisamyc,
based on the error, it looks like you didn’t wrap the code that uses the hooks in the DamlLedger context provider. You can see an example of how to do that in create-daml-app.

1 Like