Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Browsing all 6213 articles
Browse latest View live
↧

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 Article


Property '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 Article


Image may be NSFW.
Clik here to view.

Fix 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 Article

Image may be NSFW.
Clik here to view.

FlatList 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 Article

Why 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 Article


Image may be NSFW.
Clik here to view.

Fix 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 Article

Configuring 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 Article

How 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 Article


How 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 Article

Is 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 Article

React 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 Article

Pass 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 Article


Too 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 Article

unable 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 Article


Image may be NSFW.
Clik here to view.

drop 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 Article

React-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 Article


How 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 Article

Using 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 Article

Why, 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
Browsing all 6213 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>