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

TypeError : undefined is not an object (evaluating '_iterator[Symbol.iterator]')

I have this error with a React Native TypeScript Application on both Android and iOS.TypeError : undefined is not an object (evaluating '_iterator[Symbol.iterator]')This error is located at: in Capture...

View Article


React Native App using native-base and react-native-web fails to compile on web

I'm using react-native-web and native-base to build an app (bootstrapped by CRA-typescript template) and the following error is thrown on the compilation.I have followed the exact same steps mentioned...

View Article


Image may be NSFW.
Clik here to view.

@react-navigation/native upgrade to V5 SyntaxError

I am having some trouble with upgrading my react-navigation from v3 to v5. I keep running into this error, at first I thought it was a bug but I am not finding any other complaints online about it. To...

View Article

Display Vertical text in react native like drawer

I need to display text in vertical position. the text will be dynamic so it can be short or long. i've added the screenshot of what i want. can anybody share the code for this type of ui. thanks in...

View Article

TypeScript Unable to resolve path (2307)

I'm building a react-native application. I've spent hours on this problem but nothing has helped me. I'm trying to use tsconfig paths for shortening my long relative imports:My tsconfig...

View Article


React hook useState doesn't update array from the first time [duplicate]

I have a problem with useState hook. I'm trying to do some kind of tests. But I don't understand how it works. I have two components - SurveyScreen and QuestionItem:const SurveyScreen: React.FC = ()...

View Article

While converting javascript code to typescript, where I should write the...

I am converting javascript code to typescript. I have few js files which contains shouldComponentUpdate(nextProps) {...}/ componentDidUpdate(prevProps) {...}How can we convert this code in typescript...

View Article

React-Native nested navigation not working in expo

I'm using the React Native Stack Navigation to configure the header in my app and then nest a Drawer Navigation inside of it.In the android emulator, everything is working fine. But whenever I try to...

View Article


Image may be NSFW.
Clik here to view.

Animating a shared component between screens in react native

I am fairly new to react-native and I am trying to add an animation to the header of two screens. The animation that I want to achieve is very simple, the header should just collapse. As it is a shared...

View Article


how to declare the type in my functional component?

I wanted to declare the type in my component this way, I already saw that this is possible using classes, but how could I do it using functional components? Without having to export the interface? I...

View Article

Image may be NSFW.
Clik here to view.

how to remove red underline error in vscode? (typescript)

I am developing a app with React-Native and I am using vscode as a code editor.When I import some image or package, I got these red and yellow underline error.How to fix this?One thing that I can't...

View Article

Updated state is not reflected in my onPress event

I'm trying to implement a slider in my react native app. I'm using the react-native-web-swiper library. I'm using the useState hook to monitor which index the swiper is on. In the onIndexChanged() prop...

View Article

How should I define type of props supplied by react-navigation?

I have a react native app with navigation stack defined:<Stack.Navigator initialRouteName={NavigationLocations.SIGNUP} ... }}> ...<Stack.Screen name={NavigationLocations.SHEET}...

View Article


Typescript complications with string unions

I'm trying to create a function that returns JSX depending on the name prop.Here's my code:function TabBarIcon(props: { name: | React.ComponentProps<typeof Ionicons>['name'] // 'key' | 'item' |...

View Article

Why one would pass a function to a react component to obtain the data instead...

I have a question, that might be subtle (or not).Why one would pass a function to a react component to obtain the data instead of data itself?A short example would be<CompTest data={data} ...>...

View Article


filter array of objects based on list of values

I have an array as followingarray = [{ name: 'A' instructors: [ { name:'InsA' } ] businessUnit: {name:'myBusiness'}},{ name: 'B' instructors: [ { name:'InsB' } ] businessUnit: {name:'myBusinessB'}}]I...

View Article

Image may be NSFW.
Clik here to view.

React native animation progress bar

I am trying to build a progress bar for my react-native projectIt should be a generic component to be used in many places.Please see my code:The progress bar tsx:import React, { useEffect } from...

View Article


How do i get the closest next date in an array of dates using moment js?

Ok i need to get the closest date (hours/minutes) in this array of dates, no matter how far the date is from the current day, say like right now is 13:55PM and this array has[ 11:41, 14:20, 15:30,...

View Article

Image may be NSFW.
Clik here to view.

draw a vertical line between 2 objects

Is it possible to draw a vertical line between 2 text objects? I looked into this but this is not exactly what I need:https://reactjsexample.com/draw-a-line-between-two-elements-in-react/<View...

View Article

Initializing Text.defaultProps with Typescript

I just started rewriting my existing react-native project from js to typescript.To disable font scaling, I set Text.defaultProps.allowFontScaling to false at the beginning of App.js and it worked...

View Article
Browsing all 6287 articles
Browse latest View live


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