1

I'm using react and drizzle and want to update the classes state based on data returned from a call to a contract. I'm using the standard pattern from the drizzle box and here (https://itnext.io/how-to-use-drizzle-truffle-and-react-to-make-the-best-front-end-for-your-ethereum-dapp-ee09c8e94eae) and all of these only get the result of the contract call inside render(), but I'm wanting to use it to update the state, the view may need to change based on transactions sent by others. Updating the state inside render seems wrong even if it's only done when it changes, how can I get a different callback using drizzle which gets the results of the call outside of render?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.