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
22
votes
4 answers

How to run socket.io in the background on iOS in a React Native app?

I am using socket.io in an iOS React Native(v0.20) app. The app tracks my location, and when my position changes it emits a message to a server. If the socket connection is lost the server sends an email to notify me. I have the location tracking…
EasilyBaffled
  • 3,822
  • 10
  • 50
  • 87
22
votes
4 answers

ReactNative TextInput not visible iOS

I have the following stripped down render result: return ( ); The generated TextInput is not visible in iOS, unless I specify the height, and when using…
Giannis
  • 5,286
  • 15
  • 58
  • 113
22
votes
4 answers

What is the easiest way to use material design in a react-native iOS app?

I have found these partial implementations on Github as the leading contenders although they have a way to go: react-native-material-kit react-native-material-design They are lacking some components at this time that I would like to utilize. Is…
David Handel
  • 321
  • 1
  • 2
  • 3
22
votes
2 answers

How in React native destroy an component instance to avoid memory leak and release underlie views objects of native code?

I want to destroy some component that i have instantiated to release memory. In my current app almost every view that i instantiate and then release it (remove reference to it) doesn't get garbage collected. I keep no reference to to views. I'm…
Hamid Karimi
  • 615
  • 1
  • 8
  • 12
22
votes
2 answers

React Native: How to split a file up into multiple files and import them?

I am writing my first app in react native and my js file is getting pretty big. What is the proper way to split the file up. If i have something like var MyClass = React.createClass({ ... }) Can I save it at myclass.js and include in by some…
22
votes
6 answers

Deploy/Publish Android app made with React Native

How can I deploy and publish an Android app made with React Native to Google Play?
John Victor
  • 221
  • 1
  • 2
  • 3
22
votes
2 answers

WebStorm + ReactNative?

Is it possible to debug ReactNative code from WebStorm? ReactNative allows debug from Chrome/Safari, maybe WebStorm could use these ports for debugging from IDE somehow?
aksonov
  • 853
  • 6
  • 21
21
votes
8 answers

Getting Error: "Use process(css).then(cb) to work with async plugins"

screens/HomeScreen.js: Use process(css).then(cb) to work with async plugins Here is my HomeScreen.js import { View, Text } from 'react-native import React from 'react' export default function HomeScreen() { return (
21
votes
7 answers

Unable to use typescript with expo - "It looks like you're trying to use TypeScript but don't have the required dependencies installed"

I am receiving an error while trying to use Typescript with my existing expo project. While following the docs, I created a tsconfig.json file in the project root. When running expo start, I am prompted to install the typescript dependencies. …
RossB
  • 329
  • 1
  • 2
  • 4
21
votes
4 answers

com.segment.analytics.android:analytics error while submitting my app to Google Play Console

I am trying to submit my React Native EXPO app to Google Play Store for approval, but I am getting this error: SDK Segment Analytics Android (com.segment.analytics.android:analytics), 4.9.4 collects personal or sensitive data that includes but may…
Robyn
  • 221
  • 2
  • 5
21
votes
3 answers

react-native swipeable gesture not working on android?

I am doing a react native course with Mosh (https://codewithmosh.com/). I am using expo. I am very new to react native and don't really know what I am doing, but I know my code should work. I double-checked my code against his and even went so far…
Kris_Stoltz
  • 928
  • 4
  • 11
21
votes
5 answers

React Native Warning: Receiving warning from the console

I'm new in react native and I am receiving this warning or error when I run my react native project. ReactNativeJS ▶︎ 'EventEmitter.removeListener(\'change\', ...): Method has been deprecated. Please instead use `remove()` on…
Hamid Hussainy
  • 358
  • 1
  • 5
  • 11
21
votes
13 answers

Invalidate queries doesn't work [React-Query]

I'm trying to invalidate queries every times users press button "likes" to refresh all queries but without success so far despite following the docs. I have a component that get data : const { data: resultsEnCours, isLoading, isError, …
yoann84
  • 518
  • 1
  • 3
  • 14
21
votes
3 answers

New RN project in M1 mbp built failed. "Could not find node. Make sure it is in bash PATH or set the NODE_BINARY environment variable."

System: OS: macOS 11.3 CPU: (8) arm64 Apple M1 Memory: 124.86 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.0.0 - /opt/homebrew/bin/node Yarn: Not Found npm: 7.10.0 - /opt/homebrew/bin/npm Watchman: Not…
pekanchuan
  • 867
  • 1
  • 6
  • 11
21
votes
7 answers

Google Play Console Warning : Unknown validation VALIDATE_APP_MESSAGE_NO_APKS

I've just updated my React-Native app and got this error message at Google Play Console when I tried to make another internal test version. Unknown validation VALIDATE_APP_MESSAGE_NO_APKS The latest version was uploaded with no trouble and there…
suyeon woo
  • 211
  • 3
  • 5