React Native and web3 v1.0.0
Asked Answered
C

2

13

I've managed to run React Native and [email protected] 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 [email protected] into React Native?

Ctenoid answered 10/4, 2018 at 11:49 Comment(1)
have you tried this? gist.github.com/dougbacelar/29e60920d8fa1982535247563eb63766Biota
F
1

We were successful in integrating React-Native with [email protected]. 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.

Fonzie answered 30/1, 2019 at 17:30 Comment(0)
F
0

I have successfully integrated [email protected] 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
Frontal answered 5/6, 2021 at 16:55 Comment(1)
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 uselessPatronizing

© 2022 - 2024 — McMap. All rights reserved.