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 ArticleHow 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 ArticleGithub 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 ArticleWhy 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 ArticleTypeScript 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 ArticleHow 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 ArticleCannot 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 Articlehow 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 ArticleHow 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 Articlegenerating 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 Articlereplacing 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 ArticleProper 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 ArticleI 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 ArticleTypescript: 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 Articlereact 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 ArticleReact 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 ArticleReact 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 ArticleChange 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 ArticleTypeError: 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 ArticleProblems 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