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

Typescript: get `replace` from useNavigation() in react-navigation with...

This question resembles this how to use navigation.replace in TypeScript? which is for react-navigation 5.I also read the docs https://reactnavigation.org/docs/typescript/#annotating-usenavigationTried...

View Article


Image may be NSFW.
Clik here to view.

How to set single button selection OR logic and multiple Button selection AND...

I'm implementing some button works in React. Suppose if I select bedroom 3 then it should show only the data of bedroom 3. If I select bedroom 2,3(multiple selections) then it will be an OR logic and...

View Article


React Native error in dependencies : name can only contain URL-friendly...

I've got this issue : each time I try to npm install something (or yarn), I got this error :npm ERR! code EINVALIDPACKAGENAMEnpm ERR! Invalid package name "@types/react-navigation/native" of package...

View Article

Image may be NSFW.
Clik here to view.

React Native & TypeScript : Property 'focus' does not exist on type 'RefObject'

That's what I am doing: declare passCodeInput: React.RefObject<TextInput>;But here's an issue that I am getting while trying to call focus method:setTimeout(() => this.passCodeInput.focus());I...

View Article

React Native : Conditional Views

I want to make it so that depending on my result(the number of elements of my data), I could add a certain number of row to my code.For exemple if this number is 0=>1row, 1=>1row,...

View Article


Adding text above an image with onMouseEnter in React Native

I want to have text apear above my image when my mouse hover over it. I tryed some things, but the onMouseEnter/onMouseLeave seems the most promising. Howether I encountered an error:When I hover over...

View Article

Creating a half-white background for an image in React native ( style question)

The text in my image is displayed but difficult to read because of the dark color of the said image. In order to solve the issue of the color of the text (it must be black), I was thinking of whitening...

View Article

React Native App (Expo) and RealmDB crashes after using useQuery or...

Hello friends I come to ask for help because I’m developing an application using React Native, Expo and Realm and I got stuck at one point because my app is crashing instantly after I try to see the...

View Article


Newly cloned typescript react-native project riddled with errors

I just cloned a TypeScript React-Native project at work and it is riddled with a variety of errors on my machine for some reason, the contractor who made the app isn't sure why. Here's a few examples...

View Article


Image may be NSFW.
Clik here to view.

React Native: Typescript - data possibly undefined

I've got a some data being fetched using RTK Query. I load this data (array of objects) in a screen and then slice some portion of it.It's more of a typescript question but I'll post the...

View Article

How to solve this issue in react-native Typescript?

I am having issues with react native and typescript :"message": "Type '{ name: string; image: string; }' is not assignable to type 'IntrinsicAttributes & ICategoryCardProps & { children?:...

View Article

How to Reset react-native-picker-select on form submit using formik inReact...

I am using Formik and react-native-picker-select, I can reset text and number fields after submission but can not able to reset picker-select. How can I achieve it?

View Article

React Native : Error in the data part of Flatlist

I tried using Flatlist in order to respond to one of my issue but I got an error on the data= of my Flatlist . I don't rreally undersstand the issue and the error message is not helping ( No overload...

View Article


React Native, creating a if loop inside a return

I want to create an if loop inside my Flatlist return so that each time a new Flatlist is called, my 'pass' will go back to 0Here is my code:<FlatList data={letter.description} numColumns={2}...

View Article

typescript inferface for react navigation

I don't really understand how to set correct type to react navigation.I got a large stack a screen, and sometimes, there are nested stack like HomeStack which is also a stack of screens.Here Settings...

View Article


Image may be NSFW.
Clik here to view.

Redux & TypeScript: Property 'X' is missing in type 'DefaultRootState' - but...

Here's my Interface which I'm using with mapStateToProps:export interface IStore { cache?: any; dataManager?: IUR; userPrefs: IUP; fingerprintModal?: IfingerprintModal;}export interface...

View Article

Fix path mapping typescript in React Native

I'm trying to use typescript path mapping to improve my imports. But I have an error:@UI/MainHeader could not be found within the project or in these directories:node_modulesSo I updated my...

View Article


how can I handle this type with only one parameter?

I have a model of these:image: string;redirect_option: 'PROFILE' | 'PRODUCT';redirect: Product | User;Now I render the list and want add a function:const handleNavigateToRedirectedOption = ({...

View Article

How to cleanly create duplicate components with different parameters in react...

I have a bunch of components that looks like this:<View><Component containerStyle={{ color: 'blue' }} id={"test1"} onPress={onPress1}/><Component containerStyle={{ color: 'blue' }}...

View Article

Image may be NSFW.
Clik here to view.

The problem of not saving the token in cookies (react + typescript)

Jwt token is received but not stored in cookies, although credentials:'include' is setconst submit = async(e : SyntheticEvent) =>{ e.preventDefault(); await fetch('https://localhost:5001/login',{...

View Article
Browsing all 6287 articles
Browse latest View live


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