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

date conversion in react-native-library

I have created a react native library. I access the HealthKit features using React Native's NativeModule.The index.tsx file of my library:import { NativeModules } from 'react-native';const {...

View Article


How to resolve this loader issue in React?

I wanted to use this popup component from GitHubI installed it using npm (I don't know how to do it otherwise).I imported it to my App.jsimport { Root, Popup } from 'popup-ui'After importing it, I get...

View Article


Github action fails build Typescript but in local machine works

I'm using Github actions to build and push a docker container to Azure Repository within a react-native-web application. The strange thing is that in my local Windows 10 machine the build process of...

View Article

Why react native props not works?

Could you help me with following problem:props.title does not appear in {props.title}console.log(props.title); //returns Mobile App, then several lines in console there is undefined?console outputI'm...

View Article

TypeScript React Native property 'target' does not exist on type 'string'

I'm making input component in typescript for my mobile app. I'm trying to handle change of the text in text input with useState hook, so I created this:const [password, setPassword] = useState('');now...

View Article


How to write a conditional promise.resolve properly in typescript?

I have a project in react native using typescript and I would like to use Promise.resolve().then() of an object with a condition which causing a type error in typescript. Below is the situation:I have...

View Article

Image may be NSFW.
Clik here to view.

Cannot find module '@react-navigation/native' or its corresponding type...

Im having trouble im my react-native app using expo and typescript. I have installed the libraries using npm and they are available in the node_modules folder see the picture.The same problem is...

View Article

how to change .svg icon or image color when user click on it. in expo react...

I am new to react native expo. I have two svg images. one is grey color and other is orange. so I want that when user click on it it turn to orange. so how to do that. please help.here is my...

View Article


How to change or replace svg image on onclick or onpress in react native expo...

I am new to react native expo. I have two svg images. one is grey color and other is orange. so I want that when user click on it it turn to orange. so how to do that. please help. here is my...

View Article


generating and sending pdf using react Typescript

actually I am working on typescript with react. I am facing difficulty while generating and sending pdf file at the server end. How can I resolve this issue?

View Article

Image may be NSFW.
Clik here to view.

replacing enum - better solution needed

I have an app that uses React Native' Native Module. Currently the logic is that the Data type will be obtained from my enum as shown belowexport declare enum HKQuantityTypeIdentifier { HeartRate =...

View Article

Proper Timer Behavior using navigating between tab screens (React Native...

I am in the early stages of learning react native along with TypeScript and react-navigation. I am trying to implement a countdown timer app with editable time and labels. I was able to get most of the...

View Article

I am unable to pass params to a route using React Navigation

I have a button on the header to activate EDIT mode on a page, or SAVE when edit mode is done.type TabProfileParamList = { ProfileScreen: { isEditing: boolean };};const TabFourStack =...

View Article


Typescript: How to type ForwardRefExoticComponent + ComponentType

I am trying to type a Component prop that could accept both:const MyInput = RN.TextInputAs well as something more custom:const MyInput = React.forwardRef<RN.TextInput,...

View Article

Image may be NSFW.
Clik here to view.

react native library doesn't function as expected

I have a react-native-library that has my Healthkit queries. I install this library in my main app and call all the queries. The authorization part doesn't seem to work. I guess some issue in my...

View Article


React Native: how to combine component props and the navigation prop in...

I have a screen with Items on it that's rendered in a flatlist. If I "onLongPress" on an item's text/title, I should navigate to a Details page with title, etc filled in. If I press the "+" button on...

View Article

Image may be NSFW.
Clik here to view.

React Hook Forms How to pass the errors as a props using Typescript

I'm defining a useForm.const { handleSubmit, control, errors } = useForm<{email: string}>();Now I'm creating a seperate component that will the input and I'm going to pass the useForm props i...

View Article


Change default import file from index.ts to index.native.ts [react-native]

I'm building a react component library (using typescript and styled-components) and I want to reuse as much as possible code between the two targets (web and native).I have a folder called styled, and...

View Article

TypeError: undefined is not an object (evaluating 'details.geometry.location')

I'm using react-native-google-places-autocomplete package in my app. There are two fields that uses this package:- Current Location and Destination. Current Location works perfectly fine without error...

View Article

Problems with converting the notepad example of proton-native from js to tsx

I try to convert the Notepad example from the proton-native repository into Typescript. I ran into some issues I could not fix.Code:TSConfig:{"compilerOptions": {"strict": true,"target":...

View Article
Browsing all 6287 articles
Browse latest View live


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