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

Use component name as a type of React.Ref

I have an component called TextInput extending React-native's TextInput.I founded that the component name is used as a type of Ref:const ref = useRef<TextInput | null>(null)How can I achieve this...

View Article


React native TouchableOpacity and Pressable responding really slowly

I have a mapped list of Text in TouchableOpacity components in a react-native Modal displayed like this:<ModalLayout showModal={active} toggleShowModal={toggleActive} title={'Select '+ label}...

View Article


Image may be NSFW.
Clik here to view.

Unable to resolve module @react-navigation/native @react-navigation/native...

the error:Error: Unable to resolve module @react-navigation/native from D:\react-native-practice\app1\App.tsx: @react-navigation/native could not be found within the project or in these directories:my...

View Article

A way to infer types based on the return value of the function in react prop

So i have this component definition that accepts two genericsfunction AsyncFlatList<ApiResponse, Item>({}: { url: string; transformResponse: (response: ApiResponse) => Item[]; keyExtractor:...

View Article

React Native Animation - Icon and App name

React Native: How do you animate the Image? i.e Image should Come from header and name should come from Bottom

View Article


Styles from stylesheet is not applied

I'm trying to style a component but it doesn't look like the styles that I'm using is getting applied.toolTipStyle gets prop-drilled down to the component but and I can see that they exist if I...

View Article

Why does my variable return a different value than what the getter evaluates?...

I have the following code:Main:async method() { const values: RequestForHelp[] = await databaseHelper.getUnacceptedAndUnsucceededRequests(); for (const request of values) { request.userHelpMeLatitude =...

View Article

Firebase blocked on certain networks?

Alright so we’re developing a web app using react/nextjs and using firebase as our storage. It’s written in typescript.We’ve been running it without issue for a few months, but recently our client...

View Article


TypeORM query returns an empty array

I'm trying to retrieve data from an existing database. I recently switched to bare workflow from Expo managed, trying to test react-native-sqlite-storage with TypeORM. However, TypeORM raw query keeps...

View Article


How to specify (optional) default props with TypeScript for stateless,...

I'm trying to create a stateless React component with optional props and defaultProps in Typescript (for a React Native project). This is trivial with vanilla JS, but I'm stumped as to how to achieve...

View Article

Image may be NSFW.
Clik here to view.

react-native: how to make keyboard on top of the component?

I have a bottomSheet component and when the keyboard is open the view of the bottomSheet get round.The component without opening keyboard:but when keybored is opened:component code:<BottomSheet...

View Article

Image may be NSFW.
Clik here to view.

React native - KeyboardAvoidingView can't deal with View with absolute position

This is my current issue.I'm sorry that I'm not able to provide the source code because it's extremely complicated to reproduce on my side.Is it possible, in my situation, to let the keyboard opens...

View Article

React generic type prop must extend other type?

I'm kinda new to typescript so this one is confusing for me. I wanted to pass generic type into my hoc. I need to pass component props as a generic type to get Component with that types on it.const...

View Article


I am tryng to use an api to get data, but the async function its not wroking

i am tryng to get the data on the main file of a react-native aplication, so i can manipulate it and use it to create the app, but i dont know wath i am doing wrong. Let me explain:The Api its working,...

View Article

Typescript error for Icon from react-native-elements

I am getting an typescript error when i try to use Icon from react-native-elements.This is the error.Property 'tvParallaxProperties' is missing in type '{ type: string; name: string; color: string;...

View Article


Image may be NSFW.
Clik here to view.

React native is unable to find modules that definitely exist

So after playing with Expo for a bit I've decided that I'd rather develop with the option for native features if needed.I've followed all the steps here: https://reactnative.dev/docs/environment-setup...

View Article

Try to merge Cache and use "invalidatesTags" both at "createApi" of Redux...

I try to merge "Cache" and use "invalidatesTags" both in "createApi", but just one can working.Merge cache working fine, but invalidatesTags in DeleteCollection for querySelect return nothing to merge...

View Article


react-native-image-picker uri to file to node js backend

I am working on a react-native social app and trying to upload a post image from react-native using react-native-image-picker and typescript. I am able to get Image uri but have to create file/blob to...

View Article

(React Native) How to keep animated component in new place after initial...

I have a <TextInput> which, when the user enters anything into, will have a button appear from behind it.This works fine using the Animated library from react, but each time I input text into the...

View Article

Understanding react-native init template and files: What are all these files?

Today I started to play around with a fresh React Native project. I ran the basic react-native init command and got the sample project littered with all these weird files. Are all of these necessary...

View Article
Browsing all 6290 articles
Browse latest View live


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