To get started, make sure you have Node.js and npm installed on your computer. Then open your terminal or command prompt and navigate to the directory where you want to create the app.
Once there, run the following command to create a new React app named my-app
using the TypeScript template:
Copy Codenpx create-react-app my-app --template typescript
This will create a new React app with TypeScript support.
Next, navigate into the new app's directory by running:
Copy Codecd my-app
Now, you can install the Solana wallet adapter packages by running the following command:
Copy Codenpm install --save \
@solana/wallet-adapter-base \
@solana/wallet-adapter-react \
@solana/wallet-adapter-react-ui \
@solana/wallet-adapter-wallets \
@solana/web3.js \
react
This will install the necessary packages for the Solana wallet adapter as well as React itself.
You can start the development server by running:
Copy Codenpm start
This will start the app and you can view it in your browser at http://localhost:3000/
.
To integrate the Solana wallet adapter into your app, refer to the official Solana documentation for more information on how to set it up and use it.