Connect React SDK
Read contract state
Read onchain data from any contract on any chain.
Reading contract state in react is done via the useReadContract hook. The hook returns a React Query data, isLoading, and other useful state that you can use to render your component.
Extensions are a way to make complex queries from a contract in a type-safe way with a simple API.
Check out all the available extensions for more details.
Query and listen to contract events with the useContractEvents hook.
or with extensions:
Check out the contract hooks reference for more details.