0.1.8 • Published 3 years ago

use-ens-name v0.1.8

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

use-ens-name

Simple React hook for displaying ENS names (Ethereum name service).

Instalation

yarn add use-ens-name

Usage

import { useENSName } from 'use-ens-name';

const MyComponent = ({ address }) => {
  const name = useENSName(address)

  return <div>ENS name: {name}</div>
}

The hook will return null when loading, or when no name is found. You can also pass a fallback string:

import { useENSName } from 'use-ens-name';

const MyComponent = ({ address }) => {
  const name = useENSName(address, '(unknown)')

  return <div>ENS name: {name}</div>
}
0.1.8

3 years ago

0.1.7

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago