Skip to main content

Vite Javascript Starter

thirdweb starter project with Vite & JavaScript

To create a new project using this template, use the thirdweb CLI:

npx thirdweb create --template vite-javascript-starter

Using this template

Create a project using this example:

npx thirdweb create --template vite-javascript-starter

You can start editing the page by modifying src/main.jsx. The page auto-updates as you edit the file.

On src/index.jsx, you'll find our ThirdwebProvider wrapping your app, this is necessary for our hooks to work.

on src/App.jsx, you'll find the useMetamask hook that we use to connect the user's wallet to MetaMask, useDisconnect that we use to disconnect it, and useAddress to check the user's wallet address once connected.

Learn More

To learn more about thirdweb, Vite and React, take a look at the following resources:

You can check out the thirdweb GitHub organization - your feedback and contributions are welcome!

Join our Discord!

For any questions, suggestions, join our discord at https://discord.gg/thirdweb.