Questions tagged [react-native-web]

react-native-web is a library aims to make react-native projects able to run in web browser, by providing the same Components and APIs of react-native for web.

534 questions
9
votes
2 answers

Install local package as dependency with react-native

I am trying to use a package from a relative path and I have done npm install ../../ExamplePackage and react-native install ../../ExamplePackage. These packages are relative by multiple levels and not just one. I am getting the following…
Vikash Agrawal
  • 91
  • 1
  • 1
  • 6
8
votes
1 answer

How can I open an external link in new tab in react native?

I am doing: import React from 'react'; import PropTypes from 'prop-types'; import { TouchableOpacity, Linking } from 'react-native'; /** * Used to create external link to other websites */ class ExternalLink extends React.Component { _openLink…
Dimitri Kopriwa
  • 13,139
  • 27
  • 98
  • 204
8
votes
3 answers

React Native Web - Control the html tag generated by View?

I have a react native web project. At one point, I would like my View instead of generating a
to generate a
George Mauer
  • 117,483
  • 131
  • 382
  • 612
7
votes
3 answers

React-Native-Web error: rnw_blogpost.bundle.js:1414 Uncaught TypeError: Cannot read properties of undefined (reading 'isBatchingLegacy')

Adding react-native-web package to existing RN app (made with react-native init). Following the setup from this site: https://arry.medium.com/how-to-add-react-native-web-to-an-existing-react-native-project-eb98c952c12f The project compiles…
7
votes
3 answers

How to set document title by React Native Web with react-navigation?

My web application is created by React Native Web with react-navigator. react-navigator sets RouteName as document.title in default. ex.
hiroga
  • 722
  • 9
  • 17
7
votes
0 answers

Optimising Expo build:web

I have built an application in React Native for iOS and Android but I'd also like to make available via a web app. It all works great but the performance on the web app is a problem. The file size build is 2.02MB. Is there a way to optimise this…
Jon
  • 121
  • 5
7
votes
2 answers

requestAnimationFrame is not defined it Next.js with React Native Web (Animated module)

I'm working on Next.js and React-Native-Web. I managed to run them together following the official Next.js example but when I'm trying to use the Animated package from the react-native it fails with Error that the requestAnimationFrame isn't…
7
votes
0 answers

Element with fixed position on viewport in React Native Web?

I need to stick a footer component to the bottom of the viewport. The content above it is in a ScrollView. Im using React Native and React Native Web (thank you Expo) to build for both the web and native. This works for native but not web: export…
Evanss
  • 23,390
  • 94
  • 282
  • 505
7
votes
5 answers

How to use react-native-vector-icons with react-native-web?

I've setup monorepo project with react-native and react-native-web. I am sharing the same codebase for Android, iOS and Web. after installed react-native-vector-icons I've run the code in all three platforms and it works fine in Android and iOS but…
7
votes
1 answer

React-App- Rewired won't add Babel Plugin

So I am trying to run react-native using react-native-web. It requires some babel plugins to be added. My app was created using react-app-rewired. I have tried several ways to add the babel plugin, however, with no success. I am using a…
Gal Gendler
  • 191
  • 1
  • 6
7
votes
3 answers

How to be able to select file when using React Native Web?

We are building an app that’s using react native but we are not releasing a native version for the first release. We are still using web (using react-native-web for this). However, I am stuck with file upload functionality because to use a react…
catandmouse
  • 11,309
  • 23
  • 92
  • 150
7
votes
1 answer

Screen is not scrolling Expo web

I have just updated to the latest expo sdk 33, So I can use the expo web capabilities. The project appears to be working and I can navigate onto different screens but I can scroll on any of the screens. Does anyone have any idea what I might be…
Andrew Irwin
  • 691
  • 12
  • 40
7
votes
0 answers

ResourceSavingSceneView: Unexpected token (33:11) when running react-scripts start

I am using react-native-web with react-navigation 3.x. Then I am running react-scripts start a and I have this error: ./node_modules/@react-navigation/native/dist/ResourceSavingSceneView.js SyntaxError:…
7
votes
2 answers

Unable to run webpack-dev-server on react-native-web. ERROR: You may need an appropriate loader to handle this file type

I am trying to dive into React ecosystem and having issues with using react-native-web with my React Native Application. I have hosted the application on https://github.com/thedarklord1/testNativeWithWeb. I have used Redux Store and React Native to…
Abhishek
  • 2,543
  • 4
  • 34
  • 46
6
votes
1 answer

React Native Web testing jest error: ReferenceError: __DEV__ is not defined

Many people seem to have experienced a version of this issue but none of the prior solutions seem to be working for me. My app is built with CRA and React Native Web. I am testing the click behavior of a component based on View from react native. I…
1
2
3
35 36