# Is react-native-webrtc compatible with react-native-web?

**URL:** <https://react-native-webrtc.discourse.group/t/is-react-native-webrtc-compatible-with-react-native-web/1191>\
**Category:** General\
**Created:** [March 27, 2021, 4:40pm UTC](https://react-native-webrtc.discourse.group/t/is-react-native-webrtc-compatible-with-react-native-web/1191 "2021-03-27T16:40:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BenHunt](https://avatars.discourse-cdn.com/v4/letter/b/b5ac83/32.png) [@BenHunt](https://react-native-webrtc.discourse.group/u/BenHunt)\
**Post date:** [March 27, 2021, 4:40pm UTC](https://react-native-webrtc.discourse.group/t/is-react-native-webrtc-compatible-with-react-native-web/1191/1 "2021-03-27T16:40:09Z")

</div>

I’m using Expo’s bare-workflow on an empty project to test the compatibility issues I’m facing. When I try to publish the project to the browser using `expo start:web`, I get an error like the following

```auto
/home/ben/github/react-native-rtc-barebones/node_modules/react-native-webrtc/ScreenCapturePickerView.js
Attempted import error: 'requireNativeComponent' is not exported from 'react-native-web/dist/index'.

/home/ben/github/react-native-rtc-barebones/node_modules/react-native-webrtc/RTCView.js
Attempted import error: 'requireNativeComponent' is not exported from 'react-native-web/dist/index'.

```

I simply created the project with `expo init` and selected blank typescript. I then added the react-native-webrtc dependency version 1.89.1.

As an aside, I’m developing on a Windows 10 machine with an iPhone. If I’m not able to use the browser with react-native-webrtc, do I have any options for development other than buying an android phone / buying a macbook?

If this is the case, I was thinking about trying out the `RTCPeerConnection` from the standard Javascript WebAPI’s, knowing that I’ll have to switch it out for react-native-webrtc once I get a device to develop with.

This repository demonstrates the problem. Clone it and run with `npm run web`.

> **[BenHunt-io/react-native-webrtc-example](https://github.com/BenHunt-io/react-native-webrtc-example)**
>
> Repo demonstrates compatibility issues when running react-native-webrtc on the web.

Thanks!

---

<div class="post-metadata">

**Author:** ![junaiddarajat](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/junaiddarajat/32/523_2.png) [@junaiddarajat](https://react-native-webrtc.discourse.group/u/junaiddarajat)\
**Post date:** [November 10, 2021, 8:28am UTC](https://react-native-webrtc.discourse.group/t/is-react-native-webrtc-compatible-with-react-native-web/1191/2 "2021-11-10T08:28:52Z")

</div>

Hey, did you figure this out? I want to simultaneously run both React-Native-Web & Native Application builds using Expo Managed Workflow and this import is giving me the same error on Web only.

---

<div class="post-metadata">

**Author:** ![super-potion](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/super-potion/32/659_2.png) [@super-potion](https://react-native-webrtc.discourse.group/u/super-potion)\
**Post date:** [October 4, 2022, 1:22am UTC](https://react-native-webrtc.discourse.group/t/is-react-native-webrtc-compatible-with-react-native-web/1191/3 "2022-10-04T01:22:55Z")

</div>

@junaiddarajat @BenHunt

Did you ever figure this out? Running into the same issue using expo managed workflow, react-native-web 0.18 and latest versions of RN and react-native-webrtc

---

<div class="post-metadata">

**Author:** ![junaiddarajat](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/junaiddarajat/32/523_2.png) [@junaiddarajat](https://react-native-webrtc.discourse.group/u/junaiddarajat)\
**Post date:** [October 5, 2022, 2:53pm UTC](https://react-native-webrtc.discourse.group/t/is-react-native-webrtc-compatible-with-react-native-web/1191/4 "2022-10-05T14:53:49Z")

</div>

Hey @super-potion  
Yeah, it all works! Notably thanks to Expo Config-Plugins, so just get latest Expo SDK, and put in react-native-webrtc config-plugin (official; by Evan Bacon); here is its link: [@config-plugins/react-native-webrtc - npm](https://npmjs.com/package/@config-plugins/react-native-webrtc)

Ensure you follow the versioning.

All the best!
