babel-preset-react-native-web3
v0.0.4
Published
It is experimental but looks like it's working on web3 version 0.x
Downloads
6
Maintainers
Readme
babel-preset-react-native-web3
It is experimental but looks like it's working on web3 version 0.x
This makes crypto
work on JavascriptCore using crypto-browserify
and a pure javascript super basic implementation of randombytes
.
Can be considered as a workaround, since I used also global.Buffer and global.process, but that worked.
Overview
- A preset for babel to make react-native work with web3.
Getting started
# Install dependencies
yarn add --dev babel-preset-react-native-web3
yarn add web3@^0.20.2
- Add the following in your
.babelrc
{
"presets": [
// "babel-preset-react-native" or "babel-preset-expo",
"babel-preset-react-native-web3"
]
}
- Import
globals
in yourApp.js
as described below:
App.js
import 'babel-preset-react-native-web3/globals';
See sample
- https://gitlab.com/dapps/react-native-web3-sample
License
MIT @ zetta