New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

use-ens

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-ens - npm Package Compare versions

Comparing version 0.0.0-wip.10 to 0.0.0-wip.11

4

package.json
{
"name": "use-ens",
"version": "0.0.0-wip.10",
"version": "0.0.0-wip.11",
"description": "A React hook to fetch ENS data",

@@ -25,3 +25,3 @@ "files": [

"dependencies": {
"get-ens": "^0.1.5"
"get-ens": "^1.0.0"
},

@@ -28,0 +28,0 @@ "peerDependencies": {

@@ -11,6 +11,8 @@ # use-ens

## Usage
## Example
[![CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/useens-demo-q566k)
```jsx
import React from 'react'
import React, { useEffect } from 'react'
import { useWeb3React } from '@web3-react/core'

@@ -20,6 +22,12 @@ import { useENS } from 'use-ens'

const App = () => {
const { provider } = useWeb3React()
const { provider, activate } = useWeb3React()
const { address, records, owner } = useENS(provider)('dame.eth')
useEffect(() => {
injected.isAuthorized().then((isAuth) => {
if (isAuth) activate(injected)
})
}, [])
const { address, records } = useENS(provider, 'dame.eth')
return (

@@ -30,3 +38,3 @@ <>

<ul>
{Object.entries(records).map(([k, v]) => (
{records.web && Object.entries(records.web).map(([k, v]) => (
<li>

@@ -37,2 +45,3 @@ {k}: {v}

</ul>
{!active && <button onClick={() => activate(injected)}>Connect<button>}
</>

@@ -39,0 +48,0 @@ )

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc