I am building a DAPP based on drizzle box. I am struggling to find out how can i get the web3 instance without initiating a new one I want to end up with something like :



2 Answers 2


As described here : https://github.com/trufflesuite/drizzle-react/issues/22

This can be done via:


In order to make this work, you have to pass the context variable to the constructor:

constructor(props, context) {

and make shure you added drizzle to your context-types:

ExampleComponent.contextTypes = {
  drizzle: PropTypes.object

If you have the drizzle object available, you just find it at drizzle.web3

If you use drizzle context or drizzle-react. drizzle is just an object that you can access directly. Make sure drizzle is in sync and not undefined. For example

if(drizzle !== undefinde) console.log(drizzle.web3)

and there it is.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.