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

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


Absolute import typescript react native works partially

I have followed this guide to set up absolute imports in my project..Did what the third comment of Lekhnath suggested here:Absolute module path resolution in TypeScript files in VSCodefound myself able...

View Article


Incrementally convert a React Native Javascript + flow project to Typescript?

I have a large React Native project written with Javascript + flow, and would like to convert it to Typescript. This is something I've wanted to do for a while, but haven't got around to doing it...

View Article

Exception 'nil FIRApp instance passed to databaseForApp.' was thrown while...

I am new to setting up firebase in react native and I want to initialize a second configuration in firebase but I am having an error.This is my code:const secondaryAppConfig = { apiKey: ...,...

View Article

How do I configure absolute paths for imports in TypeScript based React...

In order to avoid '../../../../' style relative imports in a TypeScript based React Native app, I would like to configure the app so that I can use absolute imports instead.It is important that the...

View Article


have to JSON.parse twice to extract json object from stringified QR Code

I have some JSON{ id: "abcd", type: "receive"}which I stringified and generated a QR code using some online QR code maker. In my react native app, I am using react-native-qrcode-scanner to scan this qr...

View Article

Monkey patch react-native Text component with TypeScript

I want to monkeypatch react-native Text element render function.Typescript shows me some errors, as the exported Text class does not expose the defaultProps static member each instance has internally...

View Article

React Native Swiper ref element scrollTo does not work on first render

I am implementing an Introduction feature in my app. Where the screens show after splash screen. I used react-native-swiper component for guiding the user to step by step tutorial in my app.Here is my...

View Article


npx react-native run-android receiving "Task :app:compileDebugJavaWithJavac...

Trying to learn using react-native and running into an issue that I cant seem to get around. I am trying to make sure my boiler plate file will render on android studio emulator and am running into the...

View Article


"parserOptions.project" has been set for @typescript-eslint/parser

I created a new React Native project with --template typescriptI deleted the template directory which came as part of the boilerplate.I then proceeded to add ESLint:module.exports = { parser:...

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

react-native-testing-library working async tests but getting test not wrapped...

hey all I have working tests and I know it wants me to wrap my render in an act but if I do that I get a warning stating it can't find root. yet if I then instead change it to create i can't use my...

View Article

Image may be NSFW.
Clik here to view.

react native typescript, property 'textalign' does not exist on the type...

I just try the simple textAlign={'center'} in <TextInput/> component. It works as expect but typescript keeps complaining about the property does not exist.The code is directly from official...

View Article


How to load static image in react native without require?

I want to load image from my assets folder. I don't want to use require because it violates my eslint rules (I follow airbnb rules). I use typescript. Do you have any best practices for this?

View Article

I need to create a new object every time i click on a switch and delete it...

TLDR: i need to create a new object based on the selection from a switch on/off, if i click on, that specific project item is cloned to this new object, and so onI've been suffering from a headache...

View Article


SOLVED: Error: Element type is invalid...got: undefined. Check the render...

Full error from yarn ios displayUPDATE: I have solved the error, by commenting out the whole Ionicon part. Now I have a memory leak error and now no image for search, but this question is answered!I'm...

View Article

REACT-NATIVE NativeTouchEvent event.target Event Bubbling

Hi there I have been looking for a way to allow bubbling of certain events to items that are exposed in this.props.children im sure there must be a simple way to do this with React-native? private...

View Article


Disable eslint(no-use-before-define) eslint rule on typescript

I'm, trying to disable the rule eslint(no-use-before-define) on variables in typescript because in react-native the styles are used after the component declaration, and even though the...

View Article

Image may be NSFW.
Clik here to view.

Expo cannot auto import React-native on Visual studio code in Typescript

I just start to learn the react-native with Expo SDK.I follow the official tutorial to init managed Typescript template.And I found that I can only import unique React-native component.Not the...

View Article

clearing cookies and site-data in webview for both android and ios in...

I want to clear off some site data which is getting stored on the webview I am using. I read about RCTNetworking, which looks likea solution for iOS. I was not able to successfully implement it. The...

View Article
Browsing all 6212 articles
Browse latest View live


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