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.

Filter by
Sorted by
Tagged with
253votes
30answers
178kviews

Change package name for Android in React Native

I used react-native init MyApp to initialise a new React Native app. This created among others an Android project with the package com.myapp. What's the best way to change this package name, for ...
user avatar
  • 16.2k
250votes
12answers
133kviews

How do I "shake" an Android device within the Android emulator to bring up the dev menu to debug my React Native app

I am working on a cross-platform React Native mobile app. I am writing console.log statements as I develop. I want to see these logging statements in Chrome while I'm running the Android app in the ...
user avatar
  • 5,095
245votes
63answers
151kviews

What is the meaning of 'No bundle URL present' in react-native?

When I run a react-native project, I get a error no bundle URL present , but I don't know what mistakes I do, I was very confused.
user avatar
  • 2,543
239votes
23answers
294kviews

React native text going off my screen, refusing to wrap. What to do?

The following code can be found in this live example I've got the following react native element: 'use strict'; var React = require('react-native'); var { AppRegistry, StyleSheet, Text, ...
user avatar
  • 17.1k
238votes
15answers
164kviews

React Native Change Default iOS Simulator Device

When I run this command: react-native run-ios My app runs by default in the iPhone6 simulator device: Found Xcode project RN.xcodeproj Launching iPhone 6 (9.2)... How can I have the app run in a ...
user avatar
  • 6,882
225votes
8answers
182kviews

How to have Ellipsis effect on Text

I'm having a long text in my app and I need to truncate it and add three dots to the end. How can I do that in React Native Text element? Thanks
user avatar
  • 2,537
219votes
14answers
310kviews

What is useState() in React?

I am currently learning hooks concept in React and trying to understand below example. import { useState } from 'react'; function Example() { // Declare a new state variable, which we'll call &...
user avatar
215votes
10answers
375kviews

How to set background color of view transparent in React Native

This is the style of the view that i have used backCover: { position: 'absolute', marginTop: 20, top: 0, bottom: 0, left: 0, right: 0, } Currently it has a white background. I can change ...
user avatar
  • 3,790
209votes
4answers
314kviews

Axios get in url works but with second parameter as object it doesn't

I'm trying to send GET request as second parameter but it doesn't work while it does as url. This works, $_GET['naam'] returns test: export function saveScore(naam, score) { return function (...
user avatar
  • 5,790
207votes
8answers
247kviews

Get size of a View in React Native

Is it possible to get the size (width and height) of a certain view? For example, I have a view showing the progress: <View ref='progressBar' style={{backgroundColor:'red',flex:this.state.progress}...
user avatar
  • 4,567
207votes
20answers
193kviews

Setting environment variable in react-native?

I am using react-native to build a cross-platform app, but I do not know how to set the environment variable so that I can have different constants for different environments. Example: development: ...
user avatar
  • 3,331
206votes
10answers
288kviews

How can you float: right in React Native?

I have an element that I want to float right, for example <View style={{width: 300}}> <Text style={{backgroundColor: "#DDD"}}>Hello</Text> </View> How can the Text be ...
user avatar
  • 11.2k
206votes
26answers
128kviews

Android failed to load JS bundle

I'm trying to run AwesomeProject on my Nexus5 (android 5.1.1). I'm able to build the project and install it on the device. But when I run it, I got a red screen saying Unable to download JS bundle. ...
user avatar
  • 4,567
205votes
17answers
227kviews

Build and Install unsigned apk on device without the development server?

As I am new in react-native so if there is anything wrong in steps let me know. I have build a react native android app using the command as per documentation react-native android while running ...
user avatar
  • 2,331
201votes
27answers
154kviews

React-Native: Application has not been registered error

I am currently going through the React-Native tutorials. I began with the Getting Started tutorial, where I made a new react native project and successfully managed to run the project on my device. I ...
user avatar
  • 2,261

15 30 50 per page