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

If else within a map

Each of the user relations object looks like this:"userRelations": [ {"relatedUser": {"id": 4,"firstName": "Jack","lastName": "Miller" },"type": "FRIEND" }, {"relatedUser": {"id": 3,"firstName":...

View Article


React Native elements not rerendering after state change

I have been looking at this error for 2 days now, and I cannot seem to figure out how and why this is not working. I have a FlatList of ProductComponent elements in my app which can be bought and sold...

View Article


VSCode react native no import errors detected in code

I have been using vscode for couple of years but recently with version 1.45 i don't see any errors detected while i code . For example , it does not validate whether the import statement is valid nor...

View Article

Image may be NSFW.
Clik here to view.

React Native Align button on top of keyboard for all devices

So I need to align a button Which is not at bottom om screen by design should be at middle of screen but it should align to be on top of the keyboard for all devices. If you check this screenshot : for...

View Article

expanding React ecosystem similar to Angular

Angular appears to come with everything which for the client-side. On the other hand, React comes by itself. Are there any common consensus on how to get expand React/React Native with typescript in...

View Article


Return DB results from a function in a different file (React...

I'm trying to read data in one file from an SQLite database and return it to display in a different file. Firstly, I'd like to be able to manipulate the data prior to displaying it, for example, return...

View Article

Why can I use a variable before declaring it in JavaScript / TypeScript?

To my understanding, after ES6 and the introduction of let and const, a variable declared with them must be declared before it's used. However, I have run into many examples where my code runs just...

View Article

.filter with a map in Typescript

I am using data that is returned via a graphql query. Each of the user relations object looks like this:"userRelations": [ {"relatedUser": {"id": 4,"firstName": "Jack","lastName": "Miller" },"type":...

View Article


React Native SectionList: What are the correct TypeScript types

I'm building a React Native app using TypeScript. I'm trying to use a SectionList. I followed the docs, and here is my code: renderSectionHeader = ({ section: { title } }: { section: { title: string }...

View Article


forEach function in typescript

I am working with graphql returned data that looks like this:"userRelations": [ {"relatedUser": {"id": 4,"firstName": "Jack","lastName": "Miller" },"type": "FRIEND" }, {"relatedUser": {"id":...

View Article

Error while adding NavigationContainer in react native with typescript

When I define my NavigationContainer on separate file I get following error:'NavigationContainer' refers to a value, but is being used as a type here. Did you mean 'typeof NavigationContainer'?But when...

View Article

Include a JS file in a React-Native Typescript project

Basically I am trying to customize a library file written in plain javascript and put it as a local file in a React-Native typescript project, the moment I try to convert the .js file to .ts/.tsx file,...

View Article

Mocking with RN Detox

I am following the detox mocking guide with typescript. The app always prints console.log of X.ts file instead of X.e2e.ts file.Dependency version.react-native: 0.61.5,detox: 16.4.0Metro...

View Article


React Native Typescript Formik typings of handleSubmit in onPress

I just started a project on React Native with Typescript and came along Formik in order to build form in my application.I did the great formik tutorial guide and saw the use of formik with RN section...

View Article

react Profiling not supported

Chrome React Dev Tool's Profile Tab Said to me "react Profiling not supported".\nBut, I'm Set at my webpack.config.prod.js.\nIm followd all description in...

View Article


Consume `index.d.ts` declaration file in source code

I would like to reuse the type definitions within index.d.ts when porting plain .js files to .ts in my project. However I get Cannot find name 'Type'. I feel like this is some configuration issue I'm...

View Article

Axios Post request in React Native

I am new to react native and trying to post a request to an api, but I am having different results and I am not able to understand why this is happening what I am missing. Below is the code and after...

View Article


Nested flatlist with array for JSON data - React Native

Trying to display them as list item, date(2020-05-10,2020-05-22 etc...) as header and Hokey, Shopping under the date headers as list item.{"2020-05-10":[ {"title":"Hiking" }, {"title":"Shopping" }...

View Article

Image may be NSFW.
Clik here to view.

How to change position of rendered elements in react-based browser game?

So the project I am working on is a sort of online-roulette. It's a game that has up to 12 players and I need to position them around the table on approximately equal distance from each other no matter...

View Article

Polygon is not draggable

I drawn a polygon using MapboxGL.ShapeSource and added MapboxGLView.PointAnnotation on every point to make points draggable.But i'm facing issuesWhen i finished the draw of Polygon, i'm not able to...

View Article
Browsing all 6212 articles
Browse latest View live


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