Pre-requisites
This section is to inform you about the pre-requisites for integrating WalletConnect as an App with React.Cloud Configuration
Create a new project on WalletConnect Dashboard at https://dashboard.reown.com and obtain a new project ID. You will need this project ID to initialize WalletConnect in your project (app).Don’t have a project ID?Head over to WalletConnect Dashboard and create a new project now!
Get started
Installation
If you are setting up your React app, please do not use
npx create-react-app
, as it has been deprecated. Using it may cause dependency
issues. Instead, please use Vite to
create your React app. You can set it up by running npm create vite@latest
.Implementation
Here is a sample implementation of WalletConnect App SDK with React. You can also check the example repository below.AppKit Core Example
Check the React AppKit Core example
UniversalConnector
class. Which simplifies the integration of Appkit Core by providing a single interface for all the blockchain protocols.
You can configure the Universal Connector with the networks you want to support.
For more information, please visit RPC Reference section from our docs.
We recommend creating a config file to establish a singleton instance for the Universal Connector:
Trigger the modal
To open AppKit Core you need to call theconnect
function from the Universal Connector.
Smart Contract Interaction
Wagmi hooks can help us interact with wallets and smart contracts:Read more about Wagmi hooks for smart contract interaction here.