WalletConnect / web3modal-react-native

Web3Modal React-Native SDK
https://web3modal.com
Apache License 2.0
46 stars 15 forks source link

React not defined for web #35

Closed meppsilon closed 1 year ago

meppsilon commented 1 year ago

Hey @ignaciosantise !

I am running into one more issue that I'd appreciate your feedback on. This time it happens when running the app in the web.

When I try to run the app in web, I am getting a React is not defined error for the components that I import from this package.

Screenshot 2023-05-23 at 10 12 17 AM

I am building/running the app using expo, which uses react-native-web under the hood. I am not running into this issue when running the app in iOS so I think the issue is limited to the web only. It might have something to do with web expecting separate build settings than mobile.

Let me know if you have any thoughts on what might be causing this.

Also, I'm not sure if this package is meant to support react-native-web. If not, please feel free to direct me elsewhere.

Thanks again for your help!

meppsilon commented 1 year ago

I ran into the same problem with the example app locally.

Initially, the example app works because it is pulling in the code through the direct file system, but when I modify the babel config to import it through npm, I get the same problem so it might have to do with how the code is built and stored in npm.

ignaciosantise commented 1 year ago

hey @meppsilon ! This package is meant to be used in Android & iOS only.

Web support is not yet in our plans. For a web version of web3modal, you can check here: https://docs.walletconnect.com/2.0/web3modal/about

meppsilon commented 1 year ago

Okay, great! That's good to know. Thanks @ignaciosantise.