Using a function on stylesheet typescript react native
I try to use some variables inside my StyleSheet file.The UI is working fine. But the type is error.Any idea how to solve this?type buttonStyle = (height: number, width: string, color: string) =>...
View ArticleCalculate time between 2 given API dates in React Native
I have 2 given dates from API, so I need to calculate difference between these 2 dates in hours.Here is the Apichallenge: [startDate: "2022-02-17T23:00:25.441",endDate: "2023-02-17T23:00:25.441",]And I...
View ArticleUsing Scroll View in React Native
enter image description hereI want parent Screen to be fixed and Child Screen to be scrollable. using scroll doesn't provide me that functionality so what should I do ?
View ArticleReact Native expo error: duplicated files or mocks
I started a React Native project which is using AWS Amplify as backend.Until adding the amplify project, Expo was rendering my app properly.Here are the detailed steps I took since installing Amplify:I...
View ArticleHow can I fix this react-native dyld_process_snapshot_get_shared_cache failed
I have crash issues with react native ios application.This application build success.But when started this app crashed.Here is my error report.The steps that I take to reproducibly cause this error are...
View ArticleImage rendering using async storage, variables not ready
I have an issue with this React Native project where when this page loads in the app, I get the following error: source.uri should not be an empty string. It loops round a couple more times, and the...
View ArticleHow to install Detox + jest (ts-jest) + Typescript in a react-native project?
I've trying to use Typescript in my detox tests. This gist was the most I could find. I get an error telling that jasmine is not defined. Searching thorugh Detox's issues I found that they're only...
View ArticleArgument of type 'Blob' is not assignable to parameter of type 'SetStateAction'
I am trying to set a Blob value when using useState(Blob) it's not working -,-Tried to use null or String or just leave it blank, It is the same issue.import * as ImagePicker from...
View ArticleGender | null) | null">ts enum not working Argument of type '"MALE"' is not assignable to parameter...
I want to use ENUM but I got this error message:Argument of type '"MALE"' is not assignable to parameter of type 'Gender | (() => Gender | null) | nullCode:enum Gender { MALE = 'MALE', FEMALE =...
View ArticleReact Native: Pushing items to State Array not working
I need to push items to my array, but when I console.log this array, it says 'undefined' for the specific value. I'm trying btw to fetch data from firebase storage.How do I correctly add items to an...
View Articlereact native - typescript - picker created dynamically?
I am new to React Native and to TypeScript. I was wondering if it is possible to create a picker completely dynamically. For instance, instead of using (const [selectedQLType, setQLTypePicker] =...
View Articlepicker created dynamically?
I am new to React Native and to TypeScript. I was wondering if it is possible to create a picker completely dynamically. For instance, instead of using (const [selectedQLType, setQLTypePicker] =...
View ArticleHow to import React-Native types via Typescript for Flow?
In my react-native application I have a TextInput component. The TextInput reads some types from the following...
View Articleerror An unexpected error occurred:...
After uninstalling the react-native-clii run this command to initiate a RN project with typescript template:npx react-native init MyApp --template react-native-template-typescriptbut i got this...
View ArticleUpload image from React Native to ASP.NET Core Web Api
I'm using react-image-picker to take pictures and get the URI but I'm having problems receiving images as an IFormFile in my API. When using the "Content-Type": "multipart/form-data" header my array is...
View ArticleWhy are they over 7k warnings on a new React Native project
Is it normal that you have over 7200 warnings in XCode when you start a new React-Native project and why is no one talking about it?Or is something wrong with my environment?
View ArticleHow to typing renderItem Flatlist received by prop in react native and TS?
I have a component HorizontalList that render this:<HorizontalList data={categories} renderItem={renderCategories} titleList={'Categories'}/>this is my component file that receives the following...
View Articlets error goes away when I use arrow function but come when I not use arrow
Why I get this error message:Type '(message?: string | undefined) => void' is not assignable to type '(event: GestureResponderEvent) => void'. Types of parameters 'message' and 'event' are...
View ArticleHow to update Context manually for React Native android?
I have set up a language context for my app which works to change the language when I change the language of the device.What I am trying to accomplish now is adding a button to switch the language...
View ArticleUpdate the Object from object parameter which contain same keys but got TS error
In My Dashboard file I'm passing data like thissupdateDashboardApiData({ volumeData: [], volumeReportData: [],})In my store fileReceive the paramsExtract the Object keysUpdate the correspondent...
View Article