# Web3 integration with custom Typescript/React code

**URL:** <https://community.weweb.io/t/web3-integration-with-custom-typescript-react-code/829>\
**Category:** Developer corner\
**Created:** [July 19, 2022, 6:21pm UTC](https://community.weweb.io/t/web3-integration-with-custom-typescript-react-code/829 "2022-07-19T18:21:36Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![zanjani1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/zanjani1/32/963_2.png) [@zanjani1](https://community.weweb.io/u/zanjani1)\
**Post date:** [July 19, 2022, 6:21pm UTC](https://community.weweb.io/t/web3-integration-with-custom-typescript-react-code/829/1 "2022-07-19T18:21:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [July 19, 2022, 6:28pm UTC](https://community.weweb.io/t/web3-integration-with-custom-typescript-react-code/829/2 "2022-07-19T18:28:25Z")

</div>

There is a property `isReact` in the [documentation](https://developer.weweb.io/api/#options-isreact) 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.

---

<div class="post-metadata">

**Author:** ![zanjani1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/zanjani1/32/963_2.png) [@zanjani1](https://community.weweb.io/u/zanjani1)\
**Post date:** [July 19, 2022, 6:33pm UTC](https://community.weweb.io/t/web3-integration-with-custom-typescript-react-code/829/3 "2022-07-19T18:33:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [July 19, 2022, 7:03pm UTC](https://community.weweb.io/t/web3-integration-with-custom-typescript-react-code/829/4 "2022-07-19T19:03:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![zanjani1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/zanjani1/32/963_2.png) [@zanjani1](https://community.weweb.io/u/zanjani1)\
**Post date:** [July 19, 2022, 7:09pm UTC](https://community.weweb.io/t/web3-integration-with-custom-typescript-react-code/829/5 "2022-07-19T19:09:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [July 19, 2022, 7:17pm UTC](https://community.weweb.io/t/web3-integration-with-custom-typescript-react-code/829/6 "2022-07-19T19:17:13Z")

</div>

> [@zanjani1](#):
>
> You don’t need React to add a Web3 component to a page.

Yes of course.

> [@zanjani1](#):
>
> Since Vue 3 is written in Typescript I am thinking any Typescript component should be compatible.

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

---

<div class="post-metadata">

**Author:** ![zanjani1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/zanjani1/32/963_2.png) [@zanjani1](https://community.weweb.io/u/zanjani1)\
**Post date:** [July 19, 2022, 8:21pm UTC](https://community.weweb.io/t/web3-integration-with-custom-typescript-react-code/829/7 "2022-07-19T20:21:15Z")

</div>

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;

---

<div class="post-metadata">

**Author:** ![zanjani1](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/zanjani1/32/963_2.png) [@zanjani1](https://community.weweb.io/u/zanjani1)\
**Post date:** [July 19, 2022, 8:28pm UTC](https://community.weweb.io/t/web3-integration-with-custom-typescript-react-code/829/8 "2022-07-19T20:28:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [July 19, 2022, 8:34pm UTC](https://community.weweb.io/t/web3-integration-with-custom-typescript-react-code/829/9 "2022-07-19T20:34:14Z")

</div>

feel free to send me a message

---

<div class="post-metadata">

**Author:** ![aurelie](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/aurelie/32/13249_2.png) [@aurelie](https://community.weweb.io/u/aurelie)\
**Post date:** [July 20, 2022, 12:50pm UTC](https://community.weweb.io/t/web3-integration-with-custom-typescript-react-code/829/10 "2022-07-20T12:50:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![clint](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@clint](https://community.weweb.io/u/clint)\
**Post date:** [July 26, 2022, 9:57pm UTC](https://community.weweb.io/t/web3-integration-with-custom-typescript-react-code/829/11 "2022-07-26T21:57:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Byron](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/byron/32/1773_2.png) [@Byron](https://community.weweb.io/u/Byron)\
**Post date:** [December 5, 2022, 2:38pm UTC](https://community.weweb.io/t/web3-integration-with-custom-typescript-react-code/829/12 "2022-12-05T14:38:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [December 5, 2022, 2:55pm UTC](https://community.weweb.io/t/web3-integration-with-custom-typescript-react-code/829/13 "2022-12-05T14:55:17Z")

</div>

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.
