/ren-react

React wrapper for RenJS and GatewayJS

Primary LanguageJavaScript

ren-react

React wrapper for RenJS and GatewayJS

Overview

Installation

npm install ren-react

Usage

With React Hooks

Import the library:

import { useRenJS, useGatewayJS } from 'ren-react';

Get RenJS or GatewayJS with React Hooks inside functional component:

const renJS = useRenJS('testnet');
const gatewayJS = useGatewayJS('testnet');

With Vanilla Javascript

Import the library:

import { getRenJS, getGatewayJS } from 'ren-react';

Get Web3Context:

const renJS = getRenJS('testnet');
const gatewayJS = getGatewayJS('testnet');

Learn More

License

Released under the MIT License.