StarkNet React
StarkNet React is a collection of React hooks for StarkNet. It is inspired by wagmi, powered by starknet.js.
Documentation
TODO
Getting Started
- Add
@starknet-react/core
to your dependencies.
yarn add @starknet-react/core
- Wrap your app with
StarknetProvider
import { StarknetProvider } from '@starknet-react/core'
function App() {
return (
<StarknetProvider>
<YourApp />
</StarknetProvider>
)
}
- Access the hooks from your components.
import { useStarknet } from '@starknet-react/core'
function YourComponent() {
const { account } = useStarknet()
return <div>gm {account}</div>
}
License
This library is licensed under the MIT license.