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

React Native importing local text file

I can't seem to import a local .txt file however I can import a local .json file. It's weird because they're in the same directory. Does anyone know why this is happening?This is how I import it:import...

View Article


Typescript array random not printing on screen react-native [closed]

const knowlotainment = (arr: any['Love all, trust a few, do wrong to none.', ...]) => arr[Math.floor(Math.random() * arr.length)]formatting: <View><Text...

View Article


React Native - Text Input - Long text input, cursor doesn't go at the...

I have this simple Text Input but the problem is that on Android Devices, when the user has written a long text, the cursor doesn't go automatically in the beginning of the field but it stays in the...

View Article

React Native - Text Input that allows user to enter input but also choose...

I want to create a component with Text Input and FlatList that accepts input values from user but also from a dropdown list after he starts typing.Has anyone made an implementation like this? I am...

View Article

Build failed with an exception react native AAB or APK bundle

I try all this steps https://reactnative.dev/docs/signed-apk-android and I recive thisFAILURE: Build failed with an exception.Where:Build file 'C:...\android\app\build.gradle' line: 138What went...

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

type useFormik with Typescript so it get's type all the way

I'm a virgin when it comes to formik - but quite eager to get started with it since it looks super useful. In my attempt to play around with it I haven't figured out how to leavage TS with it.const...

View Article

When to use useCallback in React?

I have gone through a couple of articles on useCallback and useMemo on when to use and when not to use but I have mostly seen very contrived code. I was looking at a code at my company where I have...

View Article


React Native Picker Select - "TS2769: No overload matches this call" on Icon...

I get this error on the Icon property "TS2769: No overload matches this call."Here is the React Native Picker Select I have used. The problem happens at the Icon property.<RNPickerSelect...

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

React Native Navigation Argument of type 'string' is not assignable to...

I have this problem with react native, react navigation, even with this error the navigation flow is still working.Argument of type 'string' is not assignable to parameter of type '{ key: string;...

View Article

React Native - Search for Value, Choosing from dropdwon List and Entering a...

Problem: I want the user to be able to enter a new value in text input, not only selecting one from the dropdown list.For the moment the user cannot do that. What should I fix so the user can do...

View Article

Image may be NSFW.
Clik here to view.

How to visualize sound waves like Google Meet does while a person talking in...

I am trying to accomplish very similar animation in the below example.My approach was like this:Get the voice volume data, append it to a view's borderWidth using a sharedValue of...

View Article


TypeScript Property 'handleError' does not exist on type 'AxiosStatic'

Hello I Converted React Native Java Script Project into Typescript all working is fine but some warning is showing me please any one help me out in this ! How to pass props from other folder please...

View Article

Custom TouchableOpacity from Pressable TypeScript error

Have this custom TouchableOpacity function component, but for the style prop I'm getting a TS errorimport { StyleSheet, Pressable, PressableProps, GestureResponderEvent } from 'react-native';export...

View Article


Conditional imports based on props

In my React Native App I have around 200-300 custom SVG components (of dog breeds) that are converted into .tsx files using the react-native-svg library.I want to dynamically import only one of the SVG...

View Article

Image may be NSFW.
Clik here to view.

How to show text input on start when text is too long but automatically focus...

I am having issue on text input on android when the text is too long. I want to replicate the behaviour in iOS that is showing the start and when tap cursor automatically set to end of text.I tried...

View Article


Typescript Error with React Native Flat List

I am getting the following error when trying to use Typescript with a React Native Flat List:Type '(item: navigationTypes) => JSX.Element' is not assignable to type...

View Article

React Native - Flatlist with Swipelist views inside , is not Scrollable

Here is the FlatList component which I cannot scroll the swiplist child components. I have tried Adding ScrollView instead of FlatList but It gives me the error virtualizedlist should never be nested...

View Article

I get the error "Expression expected" when trying to use setState with...

I try collect data from Form to allData as a component state , but get an error "Expression expected"TS1109: Expression expected. 121 | 122 | this.setState((prevState) => ({> 123 | allTasks:...

View Article
Browsing all 6287 articles
Browse latest View live


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