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

Type 'string' is not assignable to type 'ImageSourcePropType'

BackgroundI'm trying to use a SVG component which has the property xlinkHref within an Image tag. The file was a plain SVG but I turned it into a React Native Component (TSX) using...

View Article


Weird characters when merging two objects

I have this codeif (Platform.OS === 'android'&& !uiConfig) { try { uiConfig = JSON.parse(uiConfig); } catch(e) { console.log("err:", e) uiConfig = {}; } } console.log("Ui COnfig 1:", uiConfig)...

View Article


react-native-dotenv with multiple enviorments only runs local env in react...

i'm trying to expo start my react native with typescript app on 3 different environments-development, local and testing. but when i run APP_ENV=testing expo start or APP_ENV=development expo start it...

View Article

Typescript - How to type guard the existence of a module when using dynamic...

I'm currently using 'react-i18next' and 'i18next-locize-backend') in react native.I want to use locize differently for each environment(development, production).For example, in the production...

View Article

How to filter and items in FlatList

I am making an api call and storing the response in a state:var api_response = resp.docssetShift(api_response);api response:"docs": [ {"_id": "1","description": null,"shift_date":...

View Article


How to filter items in FlatList in react native

I am making an api call and storing the response in a state:var api_response = resp.docssetShift(api_response);api response:"docs": [ {"_id": "1","description": null,"shift_date":...

View Article

how can i convert image uri to base64?

i am using react-native-image-picker along with react-native-photo-editor ..photo editor returns uri of the edited image while my api supports base64,is there a way i can convert the edited image uri...

View Article

I can't use the values ​inside the render item

I can't use the values ​​inside the render item, it doesn't recognize the ItemTrending interfaceinterface ItemTrending { id: number; name: string; description: string; image: string;}const...

View Article


Sharing a typescript library in a monorepo

I'm trying to setup a monorepo with 3 services sharing some library code.This is the current situation:repo: webpdf/ package.json reference to shared-ts using github url tsconfig.jsonfrontend/...

View Article


Image may be NSFW.
Clik here to view.

Unable to resolve module when use typescript path

I modded the tsconfig to use with path with less annoying "../../.."But when i mod the tsconfig i got this errorUnable to resolve module @assets/Icons/Logo2.svg from...

View Article

React Native + Typescript: Duplicate identifier error with custom library

I've created a custom library that contains all my API-Requests to use in various React Native projects. The library has the following dependencies in its package.json"dependencies":...

View Article

Possibly the object is 'null'

I'm getting the following Typescript errors in my codeI'm getting these parameters from a previous screen. As in the example of the react nativigation...

View Article

Style not getting overwritten in react-native using styled-components

I'm trying to override a button's properties in the calling component using styled-components but it's not working. Nothing gets overridden and the component looks as though it's not taking on the...

View Article


">navigation.navigate("page_2")} />

Argument of type 'string' is not assignable to parameter of type '{ key: string; params?: never; merge?: boolean; } | { name: never; key?: string; params: never; merge?: boolean; }'.ts(2345)that...

View Article

How to implemet a reCaptcha on react-native

I'm working on implementing a reCaptcha validator for a login screen on a react-native app which has to work both on web and mobile environments.As I'm fairly new as a programmer and have little...

View Article


How can I UpdateUserProfile when signing up user, in Firebase-v9, with...

I'm trying to sign up user and then updateUserProfile with the so named function.First I had a problem with the typeof user, which I solved by importing the User type from firebase and I do a check if...

View Article

React native Typescript path alias unable to resolve module

so basically, I created my React Native with Typescript using the commandline in RN homepage:npx react-native init MyApp --template react-native-template-typescriptAfter that, I ran the project and it...

View Article


Transform a picture full of polygons shapes to code

I'm new to web/mobile app development. I'm using react-native.I have a picture containing multiple polygonal shapes, let's say this one.I'd like to transform each of theses shapes (in the picture) into...

View Article

How can I output eslint errors to Metro bundler's console?

I searched dozens and dozens of tutorials and threads but didn't find info about how can I do it.I need something like eslint-webpack-plugin solution, like middleware or something. Something that will...

View Article

Typescript type T is not assignable to type T&U in anonymous function

I have an issue where type (text: string) => void is not assignable to type intersection ((text: string) => void) & (() => any) & ...My code looks as follows:import React, { Component...

View Article
Browsing all 6287 articles
Browse latest View live


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