react-native

Javascript Library with typings is Not a Module (React Native)

杀马特。学长 韩版系。学妹 提交于 2021-02-10 20:10:22
问题 I'm trying to integrate a Javascript Library (Microsoft Playfab) into my React Native app as per recommended here. The library comes with typings and has the structure as shown here. I have a file playfabWrapper.ts with the following. /// <reference path="../../node_modules/playfab-web-sdk/src/Typings/PlayFab/PlayfabClientApi.d.ts" /> import Playfab from 'playfab-web-sdk/src/PlayFab/PlayFabClientApi.js'; function test(titleId: string, customId: string/*, success: (data: PlayFabClientModels

TextInput becomes slow after lots of typing React-native

别来无恙 提交于 2021-02-10 18:13:51
问题 I’m very much new to React Native currently i'm building a small app using expo. Currenttly i'm facing an issue when we type in the text fields continously the textinput slowing ie, in my project if the user enters 3 numbers in first field automatically it'll move on to next field. But if we do continous data submitting the switching of input from first one to second one is bit too slow. I could'nt find any solution for this. This is the working snack Snack This is the code that i've tried

RNFirebase core module was not found natively on iOS - Not fixed

☆樱花仙子☆ 提交于 2021-02-10 17:31:28
问题 Soo I am continuously getting this error after doing all available solutions here such as this one: Error: RNFirebase core module was not found natively on iOS. I already followed that step by step. I updated my pod using pod update, installed my pods using pod install, all was successful but after running the app again with react-native run-ios, I still get that error after building. Do you guys have any idea as to why it doesn't get fixed? Edit This is the exact error I get from terminal:

Array or Subcollection for storing events user uploaded

佐手、 提交于 2021-02-10 16:17:50
问题 I'm creating an events app with react native. I just wanted some advice on which would be the better more performant and scalable way to structure my data model in firestore. I have 2 collections Events and Users. A user creates an event which goes into the Event collection, In my app users can then go onto the main page and view a list of events from the events collection. I also want to have a second page in the app a "users profile" page where users can view a list of their own events,

Unable to debug test case using Jest in chrome under node devTools

泪湿孤枕 提交于 2021-02-10 15:53:41
问题 I just started using Jest. For debugging under testcase file; describe("Filter function", () => { test("it should filter by a search", () => { const input = [ { id: 1, url: "https://www.google.com" }, { id: 2, url: "https://www.yahoo.com" }, { id: 3, url: "https://www.gmail.com" } ]; const output = [{ id: 3, url: "https://www.gmail.com" }]; debugger; expect(filterByTerm(input, "gmail")).toEqual(output); debugger; expect(filterByTerm(input, "GMAIL")).toEqual(output); }); }); under Project

How to add a second header icon using headerRIght and Icon.Button

非 Y 不嫁゛ 提交于 2021-02-10 15:40:24
问题 I am trying to add a search icon next to the menu icon on my header on the right side. I have tried repeating Icon.Button but there is no change. Using React Navigation, React Native Paper, and react-native-vector-icons/Iconicons. <HomeStack.Navigator screenOptions={{ headerStyle: { backgroundColor: '#155888' }, headerTintColor: '#fff', headerTitleAlign: 'center', headerRight: () => ( <Icon.Button name='ios-menu' size={30} backgroundColor='#155888' style={{ flexDirection:"row", paddingRight:

ReferenceError: Can't find variable: navigation

一笑奈何 提交于 2021-02-10 15:11:04
问题 So what I'm trying to do is that I'd like the DrawerNavigator to be accessed by selecting the icon on the top left . Im using react nav 5 for this. I keep recieving the error displayed above. I've tried doing this using this.props.navigation but that also did not seem to work. Assistance would be greatly appreciared AppNavigator: /* eslint-disable no-unused-expressions */ import React, { useState, useEffect } from 'react' import { NavigationContainer, DrawerActions } from '@react-navigation

Network Error (React-Native, Express,Nodejs,MongoDB)

社会主义新天地 提交于 2021-02-10 15:10:48
问题 I am getting a Network Error while calling my server(nodejs) API. I have rechecked my localhost, server, and port. They are all working fine. I have also confirmed using POSTMAN and also ran the server on the web locally to fetch data. I think I have also added the cors properly in my server.js file. Want some help on this. I have also tried with dummy API and they worked fine. My imports from front-end Here is LogCat Response Header in Postman ngrok status 回答1: Hi I think you can try

Using Passwords to Navigate Screens

折月煮酒 提交于 2021-02-10 15:08:19
问题 I am doing a react native + firebase app. At the moment, I am struggling to make a message pop up asking for a certain password whenever I press one of the page routers. I have 3 pages nested in an StackNavigator at App.js . As you can see on the following code, I have 3 routers to those pages (which are HelderScreen.js , LolsScreen.js and AthleanScreen.js ). Whenever I click on these routers, I want a message pop up to ask for a unique password to each of those routers. This is my Home.js

Can’t find variable: navigation error when trying to navigate inside from inside the stack navigator

╄→尐↘猪︶ㄣ 提交于 2021-02-10 15:06:13
问题 I've added a header button and I'd like to go to a specific screen in my app when I click on that button, here's the code: function ActionBarIcon(props) { return ( <TouchableOpacity onPress={props.onPress}> <Image source={{uri : 'https://static.thenounproject.com/png/261370-200.png'}} style={{ width: 30, height: 30, marginRight : 15 }} /> </TouchableOpacity> ); } export default function App() { return ( <NavigationContainer> <Stack.Navigator initialRouteName="Orders"> <Stack.Screen name=