how to use navigation.replace in TypeScript?
I am trying to use this in my code:const navigation = useNavigation();navigation.replace('AllFriends')But I keep getting an error that:Property 'replace' does not exist on type...
View ArticleProperty 'pop' does not exist on type 'NavigationProp'
How can we use the pop() function in React Native Navigation?onPress={() => navigation.pop('Home')}>gives me a TypeScript error thatProperty 'pop' does not exist on type...
View ArticleFix Position of a FlatList
I am using a FlatList in my code like this:<View style={styles.listHolder}> {data && (<FlatList data={data.me.friends.nodes} horizontal={false} scrollEnabled renderItem={({ item })...
View ArticleFlatList hides on scrolling
I am using a FlatList which may have only one item or many items. However, when I only have one item, I would prefer it to be fixed somehow. Currently, if I hold it and scroll it down, it starts to...
View ArticleWhy is the navigation in react native not working?
I'm working with my Expo-React-Native project and I created my navigation with React Navigation. I have a list of Stores and a detail page for each one of them. This is how I'm doing...
View ArticleFix the search results on top of a container
I have a screen that looks like this:return (<SafeAreaView><View style={styles.container}><View style={styles.topContainer}><View...
View ArticleConfiguring Jest in react-native
I'm trying to setup a react-native project with expo (v38) and typescript (v3.9.4).Running into issues with setting up testing, specifically jest.So I've been following the testingjavascript course and...
View ArticleHow to show App intro slider once built on expo using typescript using...
I'm using react-native-app-intro-slider to show an onboarding for my app built on expo using typescript. I want the slider to only show for the first time during launch but seem to be having trouble...
View ArticleHow to convert timestamp value to specific time format using react native?
In my scenario, I need to convert timestamp value to specific time format in react native. I tired below code but can't able to achieve exact formate output. How to achieve it? var dateTime = new...
View Article[React-Native]: No matching version found for @types/react-test-renderer@16.13.1
I'm having issues trying to initialize a react-native project using the typescript templateI've followed the instructions for windows targeting android. As it installs the dependencies, this pops upnpm...
View ArticleIs there an interface type I can use in an interface?
I want to pass an object to a react component as well as the object's interface. Here's an example of an interface I want to use:interface TableProps { ObjectProps: Interface (doesn't work); objects:...
View ArticleReact Native how can I read QR code from gallery
I have the functionality to Scan QR to view the profile of a person. Everything is working fine but I also want a functionality to decode/to read QR from my gallery instead of scanning it.So it would...
View ArticlePass function with parameters in context provider
I am starting on React and I am finding it difficult to implement the email and password in the context.The example I'm following only shows no parameters.Ty for any helpasync function signIn(email:...
View ArticleToo many re-renders. When setting state
I'm trying to make an e-commerce app using expo with typescript and I'm having issues with loading my categories page.There's two ways which one can access the category pageThrough bottom nav - this...
View Articleunable to reset Input field
On my screen, I have an input field that looks like this:export const FavouritePointInput: React.FunctionComponent<FavouritePointInputProps> = ({ getMyLocationCoordinates, textChangeHandler,...
View Articledrop down menu hiding behind content
I have a screen that looks like this:return (<SafeAreaView><View style={styles.container}><View style={styles.topContainer}><View...
View ArticleReact-native: multiple style props in styled-component and typescript
I am using React-native typescript for my app. I am really new in React-native. lots of syntax are new to me. For styling I am using styled-components. I have created global button components. So, I...
View ArticleHow can I do React navigation user actions?
My English is not good, I apologize in advance. I am using React native tab menu. But user login and profile sections appear at the same time. For this, I hide it if there is a token. But when I steer,...
View ArticleUsing Async Storage for Localization
I have 2 different APIs that I use for localization. These return json.getEnLoc() //400kbgetEsLoc() //400kbI want to call them on App.ts while the app is being ready for running and write the returned...
View ArticleWhy, even after specifying a type parameter for a React component, the linter...
Please consider the following TypeScript (.tsx) code:import React from 'react';import { TextInputProps } from 'react-native';import { Container, TextInput, Icon } from './styles';interface InputProps...
View Article