Most voted "react-native" questions
React Native is a framework based on the React library, developed by Facebook engineers that consists of a series of tools that enable the creation of mobile applications with native interfaces for the iOS and Android platform using Javascript.
Learn more…700 questions
Sort by count of
-
1
votes1
answer331
viewsReact Native request the api via navigation response
Main.js import React, { Component } from 'react'; import api from '../service/api'; import { View, Text, FlatList, TouchableOpacity, StyleSheet } from 'react-native'; export default class Main…
javascript react react-native react-router react-navigationasked 5 years, 9 months ago Felipe Santos 96 -
1
votes0
answers36
viewsFind API app automatically
I have an application that requests a local API and I need to change the machine API because I can use multiple servers and they can have different Ips. I would like to have my app search the server…
-
1
votes1
answer36
viewsReact-Native Route Flux does not work
I tried to do everything, when I compiled after having installed the Flux Router, an error appeared saying that I was in need of some modules, such as React-Native-Gesture-Handler and…
-
1
votes3
answers128
viewsLines with two items according to screen size, is it possible?
My intention is to have lines with two items, and these items should have a width according to the screen size, ie screen 500 , I calculate 500/2 - espaços. It would be something like this. My code:…
-
1
votes1
answer948
viewsReact Native: Remove goBack() function from Android’s physical button?
I need to remove the Back Screen Action from the physical button of Android at any given time. Basically, I have a method that shows my Searchbar, while the Searchbar is visible, I need the action…
-
1
votes0
answers41
viewsHow to open a video on youtube with React Native?
I am developing an android program in React on which, the user click a button a video in the youtube application will open, but I have no idea how to integrate other programs to my
-
1
votes0
answers2042
viewsAxios get error - React Native
I’m taking a React Native course and I’m not able to make an HTTP request using Axios. This is my code: import React, { Component } from 'react' import { View } from 'react-native' import axios from…
-
1
votes0
answers233
viewsProblem with actions in reduxsauce
I’m making a simple revenue registration app in React Turn on and I’m using Redux with Duck Pattern and reduxsauce, follow the code: //DUCK DE RECEITA import { createActions, createReducer } from…
-
1
votes1
answer4677
viewsUndefined is not an Object (evaluating '_this.props.navigation.navigate') React Native
I have this signOut function that I call through a button, but when I press the exit, where it calls a onPress: () => this.props.navigation.navigate('SignIn') it returns the following error Does…
-
1
votes0
answers88
viewsDifference in the number of event shoots between Android and iOS on Facebook SDK
I have Facebook SDK 7.0.0 installed in my application React Native 0.62.2 and although it is running equally, in Facebook manager Events, Android shots do not appear for certain standard events…
-
1
votes0
answers114
viewsSelect Google Maps Location, similar Uber/99
Talk people, all good? I’m making an app where I need to select where the user is, very similar to Uber and 99. However I do not want to rely only on Geolocation, I wanted to set directly on the…
-
1
votes0
answers228
viewsRun Redux Saga on startup
I created an offline app first to perform offline actions and send when online, and it works fine, but when the app closes and restarts the action queue does not perform because whoever checks the…
-
1
votes0
answers24
viewsReact Native Compiling for IOS and APK
Hello Folks I’m starting to I’m starting to study React Native for a project and a question has arisen. I know you have the Expo option and I know that without Expo there is no way to compile for…
-
1
votes1
answer54
viewsThe app I made cancels the sound of other apps
I made an app for android, which in short is a feed of videos and images. When I open my app and some video is paused or executed, the sound of other apps is also paused (Music, radio). I’ve looked…
-
1
votes2
answers3478
viewsHow do I clean Input after saving the data?
export default class Calculo extends Component{ constructor(props){ super(props) this.state = { data: '', horario: '', ctTotalInput: '', ldlInput: '', hdlInput: '', vldlInput: '' } this.salvarDados…
react-nativeasked 5 years, 6 months ago wagner123 11 -
1
votes0
answers13
viewsPush Notification - Own service
I wonder if someone has already implemented a push notification service of their own, if there is such a possibility. I have a React app on and multiple cloud services that communicate by messaging.…
-
1
votes1
answer116
viewsI need to implement a push service Notifications in React Native
I am working on an app for doctors, in this application I need to notify the user when the time of scheduling is equal to the mobile. Doubts and problems How to do a function that compares the…
-
1
votes1
answer44
viewsHow to display "load" message while Webview is loading?
I need to display a message on screen while the Webview component has not fully loaded, but I don’t know how to detect if it has already loaded the content. Here is my code: return ( <View…
-
1
votes0
answers36
viewsReact-Nenable-Chart-kit error when changing the date object
I’m using the React-Native-Chart-kit library to render some graphics in my app. The basic structure of my code is as follows:; <LineChart data={data} width={Dimensions.get("window").width}…
react-nativeasked 3 years, 6 months ago Lima 13 -
1
votes0
answers23
viewsRemove keyboard in Reactnative application (Data Collector)
Hello! I’m developing an app in React-On for a data collector (android), but since the screen is small and it already has a physical keyboard, the client is asking me to remove the virtual keyboard…
react-nativeasked 3 years, 5 months ago Saulo Tavares 34 -
1
votes2
answers58
viewsChange the array data coming from the api
I have a question in an application on React Native I’d like your help. How do I increment a new item in the array that comes from the api. The array of api today returns so: data:[{ id:1,…
-
1
votes0
answers64
viewsChange widget height in horizontal scrollview
How do I make a horizontal Scrollview resize the height based on the active card? The problem occurs when a list is 600px high (for example) and another list is 300px high. The expected height of…
-
1
votes1
answer439
viewsCreate generic modal in React Native
I’m trying to create a Modal component that can be reused in other parts of the application. However I am not managing to carry out the opening control of the same. Follow my attempt: Modal export…
-
1
votes1
answer20
viewsHow to join two values of an array into one?
For example: If I have an array that stores the hours and another array that will store the minutes const arrayHora = [10] const arrayMinuto = [53] How would you join the two values of the arrays…
-
1
votes1
answer205
viewsUnable to load script. Make sure you`re either running a Metro server
I am creating my first project with the Genymotion simulator. I can create the project by typing in the terminal: react-native init once created, I enter my project: cd myproject Now when running…
-
1
votes1
answer1583
viewsReact Native: How to select the next Textinput after pressing the "next" button on the keyboard?
I use Input component to insert data into the main form, according to the code below. import React from "react"; import { TextInput, View } from "react-native"; const Input = ({ placeholder, value,…
-
1
votes0
answers100
viewsError installing React Native project on mobile
Good night, you guys! Next, I started studies on React Active recently. I followed all the steps of the official website for installing software and dependencies: Android Studio and Android SDK,…
-
1
votes1
answer47
viewsHow do I know whether or not to update a component?
I’m using the React, React Native and Redux to make an app. I tried to study a little about the life cycles of a component but ended up getting confused about the various options present when…
-
1
votes1
answer500
viewsCrud ID with javascript
import api from '../../services/api' export default function Area() { const [ area, setArea ] = useState([]) useEffect(() => { async function loadArea() { const response = await api.get('/area')…
-
1
votes0
answers40
viewsHow to fix React-Native installation failures to run on IOS?
Hello, Following the React-Native documentation it would seem simple if it were only to do what is indicated, only that it is not quite so, it is a mistake to believe that the whole process will…
-
1
votes1
answer466
viewsI can’t center the title
Using React-Native and React-navigation, for some reason nothing I tried worked to centralize the title. Attempts: Alignself export default class First extends React.Component { static…
-
1
votes1
answer2407
viewsWarning: componentWillReceiveProps has been renamed
I have updated my React project from version 0.57.8 to the latest version and am receiving the following warning message: Warning: componentWillMount has been renamed, and is not recommended for…
-
1
votes1
answer2105
viewsHow to convert the response to an Axios request with React-Native?
I have this class that works perfectly: import React, {Component} from 'react'; import Icon from 'react-native-vector-icons/FontAwesome'; import AsyncStorage from…
-
1
votes1
answer2114
viewsUpload image with React Native
I have this code with React Enable that should send an image to my back, but give me an error . The code is as follows import React, { useState, useEffect } from "react"; import { SafeAreaView,…
react-nativeasked 5 years, 1 month ago Israell Llopes 41 -
1
votes0
answers73
viewsWorkaround: error Calling Appregistry.runApplication in React-Native
Guys, I use the Linux Mint 19.2. While trying to run an React Native application, via terminal, using the React-Native run-android command, I came across the error Calling…
-
1
votes0
answers17
viewsCloud Save app creation for premium users only
I work with React-On and have an interest in creating an application that saves in a cloud database for premium users only. The user would normally persist on the local device, but if I had a…
-
1
votes1
answer69
viewsHow to manipulate an empty filter?
I need a logic that displays a <Text> saying that there are no items when the produtosArr.filter() is empty (or when the filter does not return anything to me).…
-
1
votes1
answer174
viewsReturn of async functions
I’m using the AsyncStorage to save the value of some tokens with the following code: Asyncstorage.js: import AsyncStorage from '@react-native-community/async-storage'; setValue = async (key, value)…
-
1
votes1
answer508
viewsGradle error in an React application
I am creating an application for study with React Native and this error appeared below. Does anyone know how to solve? I’m starting now with React and React Native and I have no idea how to fix it…
-
1
votes1
answer32
viewsProblems with ifs in React Native
Good afternoon! I have a javascript code for an application in React, but for some reason my IDE is error in a line where a else of a if, but I don’t know how to fix it! The error is found in…
-
1
votes0
answers35
viewsReact Native - Redux or Context API, how and why?
Hello, my code he needs to send a text to another screen, according to the checkbox that is marked. The message that should be sent to another screen must be the one in which had the highest "grade"…
-
1
votes2
answers1558
viewsPossible Unhandled Promise Rejection (React Native (HOOKS))
I am trying to call the API but is returning the warning error: "Possible Unhandled Promise Rejection". There are similar questions, but none specific to React Hooks from what I’ve seen. Follow the…
-
1
votes2
answers446
viewsResponse.data returns empty array (React Nativ(HOOKS))
When you require something from the backend, the return comes as an empty array. I tried both with map and with console log.. Source code: Reportscreen.js const [reports, setReports ] =…
-
1
votes2
answers1456
viewsError configuring Android Sdk on Linux
The operating system is Linux Mint When inserting: ~/Android/Sdk/tools/bin/sdkmanager "platform-tools" "platforms;android-27" "build-tools;27.0.3" acontece o seguinte erro: I’m cracking my head…
-
1
votes1
answer282
viewsUse React components methods on Hooks
Next people, I have a flat list in my React Native app, where in it I need to use a "ref" to access her "scrollToEnd()" method, but how I’m using Hooks I can’t use the ref. Here’s an example of what…
-
1
votes1
answer3173
viewsuseState with array - React Native
Good evening. I am learning the Hooks and would like help to solve the problem of updating the useState value from an array. I have the code to follow: import React, { useState } from 'react';…
-
1
votes0
answers75
viewsInclude state in a component instance (React Native)
I have the following problem trying to change the state of my Modalchat component: ExceptionsManager.js:82 Warning: Can't call setState on a component that is not yet mounted. This is a no-op, but…
-
1
votes2
answers505
viewsHow to increment a state object with another object in React Native?
Basically I have this method that takes some information from the API and stores it in a state variable (date: []), but since there are several pages, I would like to add the results in this…
-
1
votes2
answers84
viewsNestle 2 maps and write data inside each of them in the React
I need help to write a map on a page in React, but inside this map there will be another map, so before arriving at this second map it must render a data from the first map, the current code is like…
-
1
votes1
answer295
viewsHow to change a state of a Component in React navigation
I need to change a state within a function of React navigation, this state will change a behavior in the Component function TabOneNavigator({navigation}) { React.useEffect(() => { const…