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

How to fix TypeError: navigation.setOptions is not a function

I'm trying to implement react native test library with jest to my app.For now I have a problem with the navigation on my component.When I'm running the test, I've got an error :TypeError:...

View Article


Failed to install the app. Make sure you have the Android development...

Facing this issue as attached in the image.[![enter image description here][1]][1]Please note that I have gone through all the questions with same title on Stackoverflow but nothig resolved this...

View Article


React Native: 'Component' cannot be used as a JSX component. Type '{}' is not...

I just started a new project but i'm getting the following error with various packages, for example React Native Reanimated and React Navigation Stack.This is my package.json.{"name":...

View Article

Image may be NSFW.
Clik here to view.

'Stack.Navigator' cannot be used as a JSX component

There is a type issue using react navigation, when use Stack.Navigation or Stack.Group from createNativeStackNavigatorThe issue saids that the types dont match with JSX.element at the end of the...

View Article

React Native: How to modify a variable state while there is already a state?

I want to create 4 buttons and when I click on one of them, a text will appeare while the other texts disappered.However, when I click with my solution, the text is still the same. I can change the...

View Article


Make typescript compile/lint from the other modules/packages in monorepo

I am new to using monorepo with Typescript which has a react-native project and a common folder which contains the common files to be shared across projects and it is configured and works fine when the...

View Article

React Native Elements cannot be used as a JSX component - Typescript

'Text' cannot be used as a JSX component.Im using the Text elements as example but it happens for all react native elements.Code example: return (<><TechnicianDetailCard...

View Article

Spread props type in React

I was creating a react component for icon.The component looks like thisimport React from "react";import MIcon from "react-native-vector-icons/MaterialIcons";import MaterialIconCommunity from...

View Article


How to render component via FlatList?

Using react native with typescript and redux toolkitHi I'm bothering with render a list of messages via FlatList. By ScrollView everything rendering good but I need to implement infiniti scroll. So I'm...

View Article


React native typescript import image png, error

I have an error. While I can run my code with it without issue, it may become an issue later.Here is the import :import structure from "../../../assets/Structure.png";import panel from...

View Article

React Native Typescript : how to resolve an error of type of parameter for a...

I'm doing a project in react native (typescript) and here is my issue : I have this error Argument of type 'GestureResponderEvent' is not assignable to parameter of type...

View Article

State does not update its value using AsyncStorage in react-native

I am trying to save a value to async storage and then navigate to the right page depending on what the value outcome is from the Async storage. I can store data in AsyncStorage but my states does not...

View Article

React, spread operator while using a TypeScript props interface

I have this AppText component where I want to use a Props interface while having the ability to accept other props fields that I can consume with a spread operator. Here is my attempt...

View Article


how to set remaining values to last slots

Divide all the total seating capacities during the selected start and end time equally among the slots created. But, if some capacitiesare exceeding the rounding values then distribute/divide the slot...

View Article

Problem associating a reference to a view in a react native project with...

I have created a react-native project with the typescript templatenpx react-native init myApp --template react-native-template-typescriptWhen I associate a ref to a View in a tsx file I have this...

View Article


Argument of type 'string' is not assignable to parameter of type 'Pick'

Why I get this error?Argument of type 'string' is not assignable to parameter of type 'Pick<IJobs, "name">'. Type 'string' is not assignable to type 'Pick<IJobs, "name">'mockData:export...

View Article

This expression is not callable typescript error

why I get this error:This expression is not callable. Type 'String' has no call signatures.ts(2349Context:import React, { createContext, useState } from 'react';enum StagesConnect = { FIRST = 'FIRST',...

View Article


FormData not working on my react native project after update to expo SDK 45....

So this is my function using saga:function* handleAvatarUpdate({ payload }: UpdateAvatarRequest) { const localAvatarUri = payload; try { if (!localAvatarUri) return; const fileType =...

View Article

What is this format in javascript or typescript?

What is this format in javascript or typescript?I couldn't find any info.export type XXX<> = | true (= |)$ReadOnly (meanings)<{| ... |}>export type AttributeType<T, V> = | true |...

View Article

TS2786 TypeScript not reconizing UI-Kitten components

Error message on IDE:TS2786: 'ApplicationProvider' cannot be used as a JSX component.Its instance type 'ApplicationProvider' is not a valid JSX element. The types returned by 'render()' are...

View Article
Browsing all 6287 articles
Browse latest View live


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