Installing
Installing ethereal-react
can be done with any npm-compatible package manager, such as yarn
, npm
. We recommend pnpm
, as it provides a great user experience, and is incredibly fast.
- pnpm
- Yarn
- npm
pnpm add ethereal-react
yarn add ethereal-react
npm add ethereal-react
Ethers
The package makes extensive use of ethers
for interactions with Ethereum. You do not need to directly install this package, but it may be useful for more advanced use-cases. We recommend reviewing the docs of ethers to gain a basic understanding of the library.
Importing the package
The ethereal-react
package exports modern ES modules, in addition to legacy formats.
Using ES modules is preferred, as it allows for the package to be effectly tree-shaken, which can result in smaller bundles being delivered to end-users.
For example, using the named exports from the package with ESM works as follows:
import { Provider } from "ethereal-react";
If your project uses CommonJS, then you can use require
with ethereal-react
as well:
const { Provider } = require("ethereal-react");