useConnections
Hook for getting active connections.
Import
import { useConnections } from "starkweb/react"
Usage
index.tsx
import { useConnections } from "starkweb/react"
function App() {
const connections = useConnections()
}
Parameters
import { type UseConnectionsParameters } from "starkweb/react"
config
Config | undefined
Config
to use instead of retrieving from the nearest StarkwebProvider
.
index.tsx
import { useConnections } from "starkweb/react"
import { config } from "./config"
function App() {
const connections = useConnections({
config,
})
}
Return Type
import { type UseConnectionsReturnType } from "starkweb/react"