React Native TextInput that only accepts numeric characters

I need to have a React Native TextInput component that will only allow numeric characters (0 - 9) to be entered. I can set the keyboardType to numeric which almost gets me there for input except...

How to create helper file full of functions in react native?

Though there is a similar question I am failing to create a file with multiple functions. Not sure if the method is already outdated or not as RN is evolving very fast....

React-native: textAlign: 'right' not styling correctly

I'm quite new to react-native css-styling.. and have the following code: <Text> <Text style={(styles.author, { textAlign: "left" })}> {question.view_count + " views\t" +...

Styling React Native Picker

I'm attempting to style the text color of the items in a React Native picker. I've only been working in iOS so far, but if I could find a cross-platform solution that'd be awesome. I've tried the...

How to loop through an array of data in React-native?

map function is used but it returns endless loop on console.log and i cannot render the rows in return jsx also tried the foreach but its no help. cannot render the data in jsx. its possible to...

Passing Data Using React-Native Navigation

Im trying to pass data between screens in my app. Currently I am using _____________________ "react-native": "0.46.0", "react-navigation": "^1.0.0-beta.11" I have my index.js ____ import...

Cannot scroll to bottom of ScrollView in React Native

I have a very simple example of using a ScrollView and I cannot seem to scroll to the bottom. The example is completely basic, I'm not doing anything special yet the last item is never fully...

ReactNative Flatlist onEndReached not working

Im trying to call a function on onEndReached of a FlatList but it's not working. I'm calling the this.state.pageNo at the end and it's not updating. I want to use this logic later in infinite...

How to tap on a submit button in the view without having to dismiss a keyboard first?

I am using react native to implement a community feed. In each post in the feed, I can comment as seen below. However, the issue is after I enter a comment and want to press on the submit icon on...

How to show keyboard done button in multiline text in React Native

I'm having a multiline text in my react native view. When user types , in keyboard view I need to show done (tick mark) button. Instead of that it shows next line icon. Is there any way to achieve...

Cannot find module create-react-app/script/start.js

something has changed in my program structure and due to its complexity i cannot exactly point where the problem. Ever since my application crushed and no longer working i have tried different...

TextInput not working in android react native

TextInput in android is not working when i click on the input and start typing, no text is shown as input. I tested it on android 8.1 and 7.1. react-native-cli : 2.0.1 react-native : 0.55.4 class...

React-Native text get's vertically cut off for no reason

I have an interesting bug that is happening to my text. For some reason text is randomly getting cut off like so: const styles = StyleSheet.create({ container: { flex: 1, alignItems:...

set dynamic 'initialRouteName' in react-native

question is simple I know there are lots of answers available for the same question but I have differently set my own App.js file i tried almost all but no success. so my App.js looks like...

react-navigation header has a faint line

This turned into a massive adventure and subsequently, a very large and messy post, so to spare you from having to read through the mess that I keyboard-farted out below, here's a summary: Main...

How to add a text input to alert in react native

Can someone help with adding a text input to an alert in react native. Is it possible? I searched and found results that deals with multiple line text input which is not the case with me. Thanks in advance

How to break line of label on "react-native-picker-select"

I'm using react-native-picker-select from this repository: https://www.npmjs.com/package/react-native-picker-select. The labels I'm using are to big to fit the screen, so the text isn't completely...

Possible unhandled promise rejection (id 0) typeerror Body not allowed for GET or HEAD requests

import React from 'react'; import { FlatList, ActivityIndicator, Text, View } from 'react-native'; export default class FetchExample extends React.Component { constructor(props){ ...

Camera Preview in Expo is Distorted

I'm using Camera that comes from expo package and I'm having trouble with camera preview distortion. The preview makes images appear wider in landscape view and thinner in portrait view. Most of...

<SafeAreaView> not work (Views go above the notification tab)

For some reason safeAreaView does not work in my code, Views go above the notification tab. I've tried a few things but couldn't. I tried to take the style of safeAreaView and create a view below...

How to move in next tab on text click in React Native using TabView?

I am new in React Native. I am using TabView [react-native-tab-view - npm] in my project. I declared one const for rendering screens like : const renderScene = SceneMap({ signin: Sign_in, ...

CocoaPods could not find compatible versions for pod "React/Core"

when I start pod install the result : [!] CocoaPods could not find compatible versions for pod "React/Core": In Podfile: react-native-fetch-blob (from...

how to fix currentlyFocusedField is deprecated and will be removed in a future release. Use currentlyFocusedInput

I use react native, and react-native-router-flux for navigation when I want to move screen, an error appears "currentlyFocusedField is deprecated and will be removed in a future release. Use...

How to check if image is loaded from url [react-native]

The idea is to check if image is loaded from a url , if no i will show another image instead import React,{useState} from 'react' import {View, Text, StyleSheet , ImageBackground , Image} from...

Redux State Problem : TypeError: undefined is not an object

I am new to react native and redux especialy and I got an error message that I really struggle to deal with. This is the error im getting TypeError: undefined is not an object (evaluating...

Trying to use ref inside my App component but have an error Function components cannot be given refs

I try to get access to some navigation pages when signup in the app but have the following error: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to...

Appbar Title is not centered when back icon enabled react-native-paper

I am using react native paper library for Appbar. It is nice when I am showing Title and back and and menu is disabled. Problem occurred when I enable back icon. Text slightly moving to right In...

How to share QR code on react native expo?

I'm creating an app to generate a QR code, and then share it on social media. Currently, I manage to create the QR code, however, I'm lost at sharing the generated code as an image. I'm using...

Problem with react-native-papere Theme using Expo and Stack Navigation

I'm working with Expo to create a mobile app with react native, I'm trying to include styles with react-native-paper and applying a custom theme to the whole project, but it doesn't apply any...

Jest not exiting properly when using RTK-Query useLazyQuery with ReactNative

I'm trying to test some functionality I've written using RTK-Query. Ive created an api using createApi and have exported the useLazyQuery hook. I am calling this hook and then listening for...