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
0
votes
1 answer

How to generate class names instead of inline styles for react-native-web?

I'm running expo web build which uses react-native-web. I noticed it generates inline styles so if I render a list of items, the styles get repeated for each item. Is there a way to make it generate a unique className instead and add to the head…
sschottler
  • 243
  • 1
  • 2
  • 9
0
votes
1 answer

react-responsive Invalid-hook-call

I 'm trying to use react-responsive in a monorepos with styled-component and react-native-web. I've a workspace like my ui lib and i define my component like that: import styled from 'styled-components/native'; import { theme } from…
E.D
  • 831
  • 3
  • 16
  • 33
0
votes
1 answer

Error when adding react native web to react native project

I just created react native project and I want to add react native web to it. I follow document provided for it but I get this error: ERROR in ./index.web.js Module build failed (from ./node_modules/babel-loader/lib/index.js): TypeError:…
BeHappy
  • 3,705
  • 5
  • 18
  • 59
0
votes
0 answers

MapView.Polyline not working in react-native-web-maps

In my Android app it drawing the polyline but it not functioning in Web. I could not found any example even in that storybook. but In docs mentioned that it supports polyline. MyCode
zulqarnain
  • 1,536
  • 4
  • 26
  • 44
0
votes
1 answer

How to vertically center item in React native

Disclaimer: This is a question about a school project. I am working on a full stack project which is using React Native for the front-end. I am having some trouble with page layout. Here is my code: App.js: import React, {useState} from…
0
votes
3 answers

React Native : How to retrieve data from a State with a nested json array and Map that state to get a particular value with a given id

I have a react native picker which has an array of objects that i have fetched from my API and saved to state under properties. This is a screenshot of my data fetched I need to find the correct object in the array from the _id when I select the…
0
votes
1 answer

How to animate height to 100% in react-native?

I have been trying to do:
Dimitri Kopriwa
  • 13,139
  • 27
  • 98
  • 204
0
votes
1 answer

Flexbox generator does not display well in my react application

I am testing https://yogalayout.com/playground and have created that template: import React, {Component} from 'react'; import {View} from 'react-native'; export default class MyLayout extends Component { render() { return (
Dimitri Kopriwa
  • 13,139
  • 27
  • 98
  • 204
0
votes
2 answers

How to have two centered and clickable image link in react-native

I want to have the two images clickable next to each over, this is my view: function MyView(props) { return (
Dimitri Kopriwa
  • 13,139
  • 27
  • 98
  • 204
0
votes
1 answer

React Native Web: how do you center text?

I am learning React Native Web. I've been trying to center text on my web page, I've tried many suggestions from various posts but the text "my name is...His name is..." remains stuck to the top left corner of the web page no matter which…
NickyLarson
  • 115
  • 1
  • 2
  • 18
0
votes
1 answer

TypeScript not parsing react-native-web code

Already tried suggestions here and here with no luck I have a project with a directory structure like this: . - /app - /web app is a react native app (created manually, not with create-react-native-app). web is a react app created using…
Robkwood
  • 345
  • 3
  • 5
  • 17
0
votes
1 answer

Is it possible to use react-native-web to create PWA?

We are creating a web site which we want to use RN-web. (it's back port from RN app) We'd like keep the possibility of converting to PWA later, wonder if it's possible to convert RN-web to PWA?
eugene
  • 39,839
  • 68
  • 255
  • 489
0
votes
1 answer

Disable or alter size change of TextInput in react-native-web

I'm looking for away to disable or alter the automatic zoom behavior I get when I select a TextInput in a react-native-web project. This is not an issue I'm having in react-native projects, only in projects using react-native-web. It throws off my…
0
votes
1 answer

How to create a link on an image in react-native (web/android/ios)?

I want to display two clickable image with Available on App Store and Available on Google Play on my landing page which I also make with react-native-web. I am able to create an component, but it does not really look like a normal…
Dimitri Kopriwa
  • 13,139
  • 27
  • 98
  • 204
0
votes
1 answer

react-testing-library's fireEvent.click not updating result of debug() when testing react-native-web

So I have created a simple ConnectFour game using React https://github.com/pavilion/ConnectFourTDD I have created a Board and Cell components. The board is composed of a table of Cells. The test renders a 4x4 Board and clicks the first element of…