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

How to Access This.props.route.params in constructor

my first page pushing an array with some data to next page ,I want to use that data in RenderItem for flatlist.I tried bind event but its also not worked for me ,any help would be appriciated .enter...

View Article


Typescript - Conditional Type / Optional

I have a component, It takes arguments such as :interface Props { label: string; children?: React.ReactNode; withoutActions?: boolean; fieldKey?: KeyProperties; corporate: Corporate;}The withoutActions...

View Article


Integrate Huawei Mobile Services in React Native app based on Expo

I have developed an app with React Native based on Expo SDK, how can I integrate HMS in my project to make it work for Huawei devices?Shall I introduce conditional branches to either use expo-location...

View Article

How to correctly build a React Native app for Android psychical device?

When trying to build and install my android app I always get"Task :hyper-sdk-react:compileDebugJavaWithJavac FAILED". Im using ./gradlew installDebug. I also tried npx react-native run-android but with...

View Article

TypeScript & React Native: Using Pick to avoid bloating my code

I have the following interface and React Native component that uses it:import { KeyboardTypeOptions, TextInputProps } from 'react-native';import { TextInput } from 'react-native-paper';export interface...

View Article


Unknown Option error from Babel in React-Native app

I am building a react-native app with typescript in order to learn react native. Once I run the app with expo start and try to run on emulator I get this error:index.js: [BABEL] ......../index.js:...

View Article

Why webpack fails after installing @types/react-router-dom?

install @types/react-router-dom successbut webpack failremove @types/react-router-dom and webpack successpackage.json filereact-router-dom use in code

View Article

Error: "undefined is not an object" in react native

I have a React native function Quiz with them where I make a fetch GET request. I have a check if the data has loaded with the showQuestion variable. But somehow it, when the data has loaded the app,...

View Article


React Native - Too Many Re-Renders

I am trying to create a state where it shows the visibility of some components depending on if the props are not empty. I have used an if statement as shown in the code however, it creates an error...

View Article


Infer function prop input type typescript

I have a component (called Container) which has a renderHeader prop. The type of this prop is(input: { scrollY: Animated.Value onLayout: (e: LayoutChangeEvent) => void headerHeight: number }) =>...

View Article

Image may be NSFW.
Clik here to view.

Uncaught TypeError: "Cannot read properties of undefined" in react native

I have a React native function Quiz with them where I make a fetch GET request. I have a check if the data has loaded with the showQuestion variable. But somehow it, when the data has loaded the app,...

View Article

react-navigation ver6.0 shows an error when using navigation.navigate

What I'm facingWhen I'm using navigation.navigate('XXXPage'), react-navigation ver 6.0 shows the following error.Argument of type 'string' is not assignable to parameter of type '{ key: string;...

View Article

Is it possible to have a rest props for spread while using a react props...

I have this AppText component where I want to use a props interface while having the capacity to accept other props that I can consume with a spread operator, is it possible? Am I getting it wrong?...

View Article


Javascript Library with typings is Not a Module (React Native)

I'm trying to integrate a Javascript Library (Microsoft Playfab) into my React Native app as per recommended here. The library comes with typings and has the structure as shown here. I have a file...

View Article

React Native Variable Undefined

Im not understanding why my varaible is undefined, i firstly declare my variable geojsonData as a let so i am able to change the values later in the code. In my useEffect where i use an if statement to...

View Article


React native typescript : adding automatic hyphen and mask

I’m doing project in React Native.How can i add hyphen automatically while typing the social security numbers like 123456789 to 123-45-6789.How can i mask the specific number into any symbol from left...

View Article

React Native simple CRUD: how to make a page rerender when coming back from a...

I'm new to ReactNative and React and there is a thing I don't understand: how to make an already navigated page re-render when a child page changes its state. Let me explain better:I implemented these...

View Article


Image may be NSFW.
Clik here to view.

Mocking method on default export class in Jest in Typescript

ContextI would like to test a custom hook, that depends on @react-native-firebase/dynamic-links. We are using @testing-library for react-native and its utility functions to test hooks...

View Article

Remove Warning : [react-native-gesture-handler] Seems like you're using an...

I'm creating a project to learn React Native. I'm using typescript on this project. I added react-navigation : To make react-navigation working, I had to do :yarn add @react-navigation/nativeyarn add...

View Article

React Route comonent

in my App.tsx file i have this codeimport React from 'react';import {BrowserRouter as Router, Route, Switch} from 'react-router-dom'import PageRender from './PageRender';const App = () => { return...

View Article
Browsing all 6287 articles
Browse latest View live


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