Web3 integration with custom Typescript/React code

Hi, Will there be any potential issues with adding custom React or Typescript code at page level to add Web3 functionality via a provider like ThirdWeb to an app built with weweb? Or to simply add a connect button for MetaMask or any other crypto wallet. Logically, it should be possible but want to make sure before I start a project.

1 Like

There is a property isReact in the documentation but I am not sure how react components interact with the vue app in weweb.
This is an interesting question, I wait for the answer with you.

Since Vue 3 is written in Typescript I am thinking any Typescript component should be compatible. But you never know what else is under the hood.

For what I know vue and react do not talk to each other, you have different part of the page owned by a different framework and there are some project that is trying to “translate” from one framework to another.

You don’t need React to add a Web3 component to a page. You can use vanilla JS and Typescript as well as other frameworks and libraries.

Yes of course.

I am just saying that if two frameworks are written in typescript they are not necessarily compatible.

Got it. But in this case we will not be using any framework to add the web 3 component. We would simply add custom Typescript or vanilla JS code like this:

import { ThirdwebSDK } from “@thirdweb-dev/sdk”;

const sdk = new ThirdwebSDK(“polygon”);

const contract = sdk.getMarketplace(“0x9B36A51F858b…”);

const listings = await contract.getActiveListings();

const priceOfFirstActiveListing = listings[0].price;

I just looked at your site. Mind if I reach out to you directly?

feel free to send me a message

React support is in beta, but if you are going for a vanilla implementation, this will easily be “wrappable” in a Vue component, fully connected to Weweb editor.

1 Like

I’m curious if you have this working. I’m looking to authenticate users with ethers.js

Did you ever get this working @dorilama @clint ? Or, do you have a sense of how doable it is?

I didn’t try this specific case but I can tell you that using a library inside a custom component fully connected with weweb editor is very doable.

1 Like