Questions tagged [react-native]

React Native is a JavaScript library used to build native mobile apps using React. The focus of React Native is on developer efficiency across all the platforms you care about - learn once, write anywhere.

React Native is an open-source framework created by Facebook that lets you build mobile apps using only and some basic and . It uses the same design as React, letting you compose a rich mobile UI from declarative components.

React Native apps are not "mobile web apps" or "hybrid apps". They are real cross-platform mobile apps that are indistinguishable from apps built using or . is often used to bring clarity in development.

The idea behind React Native can best be captured by the slogan "Learn once, write anywhere", enabling developers to use the same development approach for both desktop/browser and mobile apps.

Technically React Native runs the JavaScript code for a React app in a background thread. Updates to the virtual DOM are collected, and all changes are sent through an API into the native portion of the app. By doing this, React Native avoids slowing down the FPS rate of the app by not making the app wait for unfinished JavaScript operations.

Resources


Related tags

133828 questions
21
votes
4 answers

React Native Getting this error 'Unrecognized operator abs'

Getting this error when adding react-navigation-drawer to my expo project, any idea how to fix this?
user13142973
  • 625
  • 1
  • 6
  • 11
21
votes
4 answers

React Native header / bottom tabbar jumping on first app load

I have a single application which includes only navigation packages. On IOS, all is fine but on Android, header and/or bottom tabbar seems like jumping (maybe recalculating their positions). This happens only when I use navigation components and…
Basar Sen
  • 349
  • 3
  • 12
21
votes
3 answers

Where to put all the screens which are common in multiple stack navigators? - React Navigation v5

Following is the hierarchy of my app navigators ├── appNavigator ( Bottom Tab Navigator) ├── feed (Stack Navigator) postDetailScreen pageDetailScreen ProfileDetailScreen ...other screens ├── notifications (Stack…
21
votes
4 answers

Could not determine the dependencies of task ':app:mergeDebugAssets'

When I run react-native run-android on my project,I get an build error of gradle. I already uninstalled react-native-ftp with npm uninstall --save react-native-ftp, removed that dependency of node_modules, clear ./gradle cached files. But the error…
Leonardo Torres
  • 385
  • 1
  • 2
  • 11
21
votes
1 answer

How to setup sendSignInLinkToEmail() from Firebase in react-native?

Working on a react-native project using @react-native-firebase/app v6 we recently integrated signing in with a "magic link" using auth.sendSignInLinkToEmail We couldn't find a good example on how to setup everything in react-native and had different…
kidroca
  • 3,480
  • 2
  • 27
  • 44
21
votes
4 answers

TaskQueue: Error with task: undefined is not an object (evaluating '_this.view._component.measureInWindow') in react native

I am very new to react native, I am facing this issue with very simple demo app while handling screen navigation Getting this error message TaskQueue: Error with task: undefined is not an object (evaluating…
div patel
  • 213
  • 1
  • 2
  • 5
21
votes
4 answers

add icon to drawer react-navigation v5

I'm trying to add an icon to each of the screens in my react-navigation drawer, but the icon doesn't appear. Here is my code : function Drawer() { return (
21
votes
1 answer

Setting up Detox with Expo on Android

I'm trying to set up Detox with Expo on Android emulator (Genymotion) but I have an error that I can't go through.... I've installed the necessary packages : Detox detox-expo-helpers expo-detox-hook Downloaded the Exponent.apk on the official…
Toto NaBendo
  • 290
  • 3
  • 26
21
votes
8 answers

react-native-testing-library: how to test useEffect with act

I am using react-native-testing-library to test my react-native component. I have a component (for the purpose of this post, it has been over simplified): export const ComponentUnderTest = () => { useEffect(() => { …
TheSoul
  • 4,906
  • 13
  • 44
  • 74
21
votes
5 answers

react native build release from .apk to .aab, how to send the app to the clients?

It's been so long since I develop a mobile app in react native, when I'm developing before, I usually generate a release apk and send it to my clients so that they can test it and have experienced it, but now when I build a release in react native,…
Dylan
  • 1,121
  • 1
  • 13
  • 28
21
votes
6 answers

unknown property 'supportLibVersion' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler

I am getting following error Could not get unknown property 'supportLibVersion' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHand I am working on react-native application and react-native-maps…
Abhi
  • 1,127
  • 1
  • 12
  • 25
21
votes
14 answers

Why "Watchman crawl failed" error in react-native immediately after updating to macOS catalina?

Trying to run react-native run-ios or build RN project from xcode, as soon as metro bundler starts, this error appears in the terminal: Loading dependency graph...jest-haste-map: Watchman crawl failed. Retrying once with node crawler. Usually this…
Jim
  • 1,988
  • 6
  • 34
  • 68
21
votes
12 answers

How can I display dotted line in react native

I need to display a dotted line in a view I have tried borderTopWidth: 1, borderStyle: 'dashed' for a view.
Alice Bob
  • 223
  • 1
  • 2
  • 6
21
votes
3 answers

Preventing multiple simultaneous logins with Cognito

We have React Native app that uses Cognito for authentication. We would like to prevent the same user ID from logging in simultaneously from multiple devices. We were hopefully that we could use a Cognito pre-authentication trigger for this.…
21
votes
3 answers

How do I force a component to unmount when I navigate to a new page in react native?

I want to make sure the lifecycle method ComponentWillUnmount fires when I navigate to a new page. I found this post, but that doesn't seem to mention anything about navigating to a new page. I also found this post but I'm using react-navigation. …
VK1
  • 1,676
  • 4
  • 28
  • 51