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

React Native Redux-Persist not rehydrating TypeScript class properly

I am working on a React Native (react@~16.9.0) Expo (expo@~37.0.3) Android app that is supposed to store hour registration data locally, for this redux-persist@^6.0.0 is used.I created a...

View Article


React native ScrollView resets positon on setState

I have a ScrollView with buttons on it. I populate ScrollView dynamicaly. After I press on the buttons inside the ScrollView, I'm changing the state of the current selected index and the posiotion of...

View Article


How can I group all console.log messages of a Typescript class

I want to group all console.log messages of a particular class with classname as an group identifier. I should see all console.log message of that class grouped under its name For Eg, I have class A...

View Article

Update child class element based on id in react

I have a interface. export interface DefaultFormList { defaultFormItems?: DefaultFormItems[]; }and export interface DefaultFormItems { id: string; name: string; formXml: string, isDefaultFormEnable:...

View Article

How to make graphology Graph observable with Mobx?

ObjectiveI'm trying to make a Graphology Graph class instance observable using Mobx. This will enable component rendering based on changes to the graph.I'm aware of this question (and answer): How to...

View Article


React Native Animated works only in one way?

I tried to create a text input with floating placeholder on it, changing background, shadows etc. Input has 3 states - when it's empty, when it's not empty and when it's focused. You can see how these...

View Article

How to access nested data interface in React TypeScript

In React TypeScript, what is the appropriate way to access data in a nested interface like the one below?export interface School { prices: Array<{ state: { response_header?: {...

View Article

what is (0, c.default) and what is it doing in this code? [duplicate]

completely new to reactJS, I wanted to understand what (0, c.default) is doing on this code snippet. the code apparently converts hexadecimal value to Base64. but before converting it to the Base64 it...

View Article


Property does not exist on type 'function'

I am trying to use the firebase.auth method in a function using typescript and I am getting a Property 'name' does not exist on type 'Function' (ts 2339). I must be missing something simple here,...

View Article


typescript Cannot add headers to a fetch api using react-native

I am using Fetch API from react-native and I am using typescript. My code looks like this:let responseLogin = await fetch('http://url_example', { method: 'POST', headers:...

View Article

Setting child routes in react

I have a profile component that further gets divided into profile-form and profile-roles. I already made routes of these subcomponents but they didn't work. Here are the sample codes of this...

View Article

Image may be NSFW.
Clik here to view.

React native props typescript

Is this correct way to pass the interface? If not please guide me. Thanks!This is my interfaceexport interface Props { username: string; password: string; usernameTouched: boolean; passwordTouched:...

View Article

Setting parent screen options based on child navigator's state inTypescript

How can I set parent screen options based on child navigator's state in react navigation version 5 using Typescript. Actually it is described in documentation. But types are not mentioned for routes....

View Article


TypeError: undefined is not an object (evaluating...

I am trying to use Facebook Auth for my firebase react native project and I am running into this TypeError at the InitalizeAsync method.import * as Facebook from 'expo-facebook';export const...

View Article

Expo SDK 37: upgrading to react-native-webview@8.1.1 broke...

My original code was working before upgrading to Expo SDK 37 and react-native-webview@8.1.1: const onShouldStartLoadWithRequest = ({ url }: WebViewNavigation): boolean => { const response =...

View Article


How to validate condition in render return using react native?

In my scenario, I am trying to create a validation logic within render return. I have asycstorage value I am getting value and validate by using below coderender() { const value =...

View Article

Unexpected behaviour of rootDir and outDir

I am trying to use TypeScript with React Native.This is my tsconfig.json:{"compilerOptions": {"target": "es2015","module": "es2015","jsx": "react","outDir": "build","rootDir":...

View Article


How can I change reactJS with some TypeScript code to a pure Javascript?

Here I have two functions created with ReactJS and TypeScript and compiled with Babel compiler, How can I change them to pure javascript?Here is the code snipets: __d(function (g, r, i, a, m, e, d) {...

View Article

Image may be NSFW.
Clik here to view.

TypeError in React Native + Redux + Typescript

Hi I am trying to build a simple redux counter example in React native using typescript using this document https://enappd.com/blog/redux-in-react-native-app/92/Even though the document uses javascript...

View Article

React Typescript - set two values into state

I have a form with 3 number fields. The user can enter a quantity and unit price. Which will then show the total price in the last field as a disabled field.My current code sets the value correctly in...

View Article
Browsing all 6211 articles
Browse latest View live


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