Socket
Book a DemoInstallSign in
Socket

babel-preset-react-native-web3

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-preset-react-native-web3

It is experimental but looks like it's working on web3 version 0.x

latest
Source
npmnpm
Version
0.0.4
Version published
Weekly downloads
2
-50%
Maintainers
1
Weekly downloads
 
Created
Source

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 your App.js as described below:

App.js

import 'babel-preset-react-native-web3/globals';

See sample

License

MIT @ zetta

Keywords

babel-preset

FAQs

Package last updated on 25 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts