0.1.8 • Published 2 years ago

use-ens-name v0.1.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 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

2 years ago

0.1.7

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago