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.
Questions tagged [react-native-web]
534 questions
4
votes
1 answer
Babel - Node modules with JSX syntax in .js files break compilation
I'm getting SyntaxError when importing a modules where JSX syntax is used within .JS files.
One example of this is "react-navigation"
Failed to compile.
./node_modules/@react-navigation/native/dist/ResourceSavingSceneView.js
SyntaxError:…

RadiantHex
- 24,907
- 47
- 148
- 244
4
votes
1 answer
adding custom Fonts to React-Native-Web
im trying to integrate some fonts (FontAwesome, Roboto, ...)
i started with FontAwesome
Folderstructure:
Projectfolder
Projectfolder/assets/fonts/ // all ttf,eof,svg files here
Projectfolder/public/ // index.html and app css…

PrinzAndreVonLandmann
- 315
- 5
- 13
4
votes
2 answers
When using redux-saga with react-native-web we get an error `Cannot read property 'mark' of undefined`
I just started playing with redux-sagas, and I am getting a strange error. We use React Native for iOS, Android and Web development, the error I am getting is specific to the web environment.
In our code, I have ./sagas/index.js with this in…

DaKaZ
- 925
- 1
- 7
- 18
3
votes
2 answers
Why will my expo-av Video not start playing automatically?
I have a Video that I am rendering with expo-av. The video renders fine, however it will not start playing upon first render. I have the shouldPlay prop set to true. I have provided a snack example here as well as some code below. If you use the…

MouseWarrior
- 391
- 4
- 19
3
votes
1 answer
How can I render an svg to look the same dynamically across different window sizes?
Using react-native, expo, and react-native-svg I have rendered an svg in my web application. Unfortunately I am struggling to get the svg to remain the same look throughout changing the web applications window size.
The goal was to create a 'wavy'…

MouseWarrior
- 391
- 4
- 19
3
votes
1 answer
React-native expo: google login works on IOS and Android, but doesnt work in web browsers
Using expo authSession I was able to make google login work on iOS and android (tested in emulators), i get the accessToken and idToken and all user data properly from google.
However when I try the same for web client, it doesnt work. Everything is…

reactnative_newbie
- 55
- 4
3
votes
1 answer
How to use hash '#' in the URL with @react-navigation
I am working with react native web, where @react-navigation is used for navigation. I am using linking so that users can navigate using the URL.
my linking configuration looks like
const linking = {
prefixes: [],
config: {
screens: {
…

Shaon Debnath
- 95
- 2
- 10
3
votes
1 answer
How to debug react-native-web with Expo and vscode?
I am trying to find how react-native-web apps (specifically using Expo and vscode) can be debugged.
I found guidance neither in the web, nor in the react-native-web's own site.
The debug configuration that comes with the React Native Tools aims to…

Mehmet Kaplan
- 1,723
- 2
- 20
- 43
3
votes
1 answer
Property '_value' does not exist on type 'Value' (in React Native docs example)
I am trying out PanResponder, and started off of the example in the React Native documentation. I'll copy part of the example code here:
const Example = () => {
const pan = useRef(new Animated.ValueXY()).current;
const panResponder = useRef(
…

raarts
- 2,711
- 4
- 25
- 45
3
votes
2 answers
NextJS webpack config - Exclude files from being compiled
I need some help with NextJS webpack config?
I have a mono-repo and share code between React-Native and NextJS. To split OS-specific code I separated the native and the web code like that: (Login.web.tsx & Login.native.tsx)
Example:…

Thomas Dittmar
- 1,764
- 1
- 23
- 42
3
votes
1 answer
Custom CSS scrollbar for web using react-native-web FlatList
I'm using react-native-web to build an android/iOS/web application. I have a FlatList full of elements, but it displays the default browser's scrollbar. Is there anyway I can apply -webkit css properties to the FlatList only on web to style the…

Michael Rooplall
- 31
- 3
3
votes
1 answer
React-redux is throwing error: exports is not defined for react-native-web
I have initially integrated react-redux for mobile platform , and it is working fine. But then i have integrated react-native-web in my existing project so now it is throwing error at runtime.
React: 16.13.1
ReactDOM/React Native:…

Dwipal Parmar
- 244
- 2
- 8
3
votes
0 answers
Uncaught ReferenceError: exports is not defined when using React-Native web
I am trying to use React-Native web to convert an existing React Native App to Web App.
The App is getting compiled successfully now, but the page appears blank and I get the following error on checking console.
It is working fine when we don't use…

Sva
- 135
- 1
- 12
3
votes
2 answers
react-native-web update: TypeError: Cannot read property 'style' of undefined
Note: My application compiles and runs smoothly with "react-native-web": "^0.11.*" in my ../common/package.json dependencies.
--
CHANGES
updating ../common/package.json -> "react-native-web": "^0.11.*" to "react-native-web": "^0.17.*"
After…

jacksonmccluskey
- 31
- 5
3
votes
0 answers
Broken styles issue with React-snap
We have created a web app using react native web. We want to add a server-side rendering to our app. We have added a code to render the page server-side, but it's not working, I can see the blank white page in the network preview tab and the server…

mitesh7172
- 666
- 1
- 11
- 21