
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@siddomains/react-ens-address
Advanced tools
The Address component is a drop-in React component for your dapps. Anytime you need to take an address as an input, you can use the React ENS Address Component instead to resolve ENS names or provide feedback with reverse records.


React ENS Address Component can be installed via npm:
$ yarn add @ensdomains/react-ens-address
$ npm install --save @ensdomains/react-ens-address
resolutionObject. This has 4 properties:{
name: 'vitalik.eth',
address: '0x123...',
type: "address" // "address" or "name" is the inputValue type
input: "0x123..." // if the resolve is called and returns an error, it will return with the other properties as null and only input will be defined
}
small class renders component in small size
All styling made in style.css. It can be take as a start point.
.cmp-address - reserved class for that component.
.cmp-address.small - for small type of component. Overriding other classes under that parent you can safety style a component.
import ENSAddress from '@ensdomains/react-ens-address'
function Component() {
return <ENSAddress provider={window.web3 || window.ethereum} />
}
import React, { useState } from 'react'
import ENSAddress from '@ensdomains/react-ens-address'
function AddressInput() {
const [resolved, setResolved] = useState({})
const [type, setType] = useState(undefined)
return (
<>
<ENSAddress
provider={window.web3 || window.ethereum}
onResolve={({ name, address, type }) => {
if (type) {
setResolved({
value: address,
type
})
}
}}
/>
{resolvedInput.type === 'address' &&
`We found your reverse record ${resolved.value}`}
{resolvedInput.type === 'name' &&
`We found your address record ${resolved.value}`}
</>
)
}
Original version was built by @industral, which was then edited and published by @jefflau
FAQs
React ENS address component
We found that @siddomains/react-ens-address demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.