13

I've managed to run React Native and web3@0.19.0 with both rn-nodeify and ReactNativify successfully.

I'm aware that web3 v1.0 does build the modules dynamically, but I'm wondering if anyone has been successful in integrating web3@1.0.0 into React Native?

TylerH
  • 20,799
  • 66
  • 75
  • 101

2 Answers2

1

We were successful in integrating React-Native with web3@1.0.0.beta.34. We used rn-nodify to complete the task. But web3 works only with a specific version of React-Naive i.e. "react-native": "0.55.4". You may have a look at our project's repo.

But you may try to use ethers.js. It has a better documentation and integrates better with react-native.

0

I have successfully integrated web3@1.3.5 in my react-native @0.64.1 application by configuring shim.js and babel.config.js folders. First create and modify shim.js,babel.config.js folders and then install packages below.

npm i --save react-native-crypto
npm i --save react-native-randombytes
npm i --save-dev tradle/rn-nodeify
./node_modules/.bin/rn-nodeify --hack --install
endo.anaconda
  • 2,449
  • 4
  • 29
  • 55
  • 3
    please do not provide answers just redirecting to some link, you should provide the solution in the answer itself and possibly provide the link as an additional resource so that the information stays in stack overflow, otherwise nothing prevents you from just deleting your repository in the future rendering you answer here totally useless – Dario Piotrowicz Jun 05 '21 at 17:04