Skip to content

schwepps/starknet-react

This branch is 1 commit ahead of, 685 commits behind apibara/starknet-react:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0265b7d · Dec 12, 2022
Dec 7, 2022
Sep 30, 2022
Jun 4, 2022
Dec 12, 2022
Dec 7, 2022
Sep 30, 2022
Sep 30, 2022
Sep 30, 2022
Feb 4, 2022
Sep 30, 2022
Sep 30, 2022
Dec 7, 2022
Dec 7, 2022
Sep 30, 2022
Sep 30, 2022

Repository files navigation

StarkNet React

@starknet-react/core Release Status MIT LICENSE

StarkNet React is a collection of React hooks for StarkNet. It is inspired by wagmi, powered by starknet.js.

Documentation

Documentation, including a small demo, is available online.

Getting Started

  1. Add @starknet-react/core to your dependencies.
pnpm add @starknet-react/core

You also need to add get-starknet and starknet to your dependencies.

pnpm add get-starknet starknet
  1. Wrap your app with StarknetConfig
import { StarknetConfig } from '@starknet-react/core'

function App() {
  return (
    <StarknetConfig>
      <YourApp />
    </StarknetConfig>
  )
}
  1. Access the hooks from your components.
import { useAccount } from '@starknet-react/core'

function YourComponent() {
  const { address } = useAccount()

  return <div>gm {address}</div>
}

License

This library is licensed under the MIT license.

About

A collection of React providers and hooks for StarkNet

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.2%
  • Other 0.8%