Creation of a glossary , if else not working? (React Native) [duplicate]
I have an issue. I want to show a different color of letters if there is no data, but there seems to be an issue with my 'if' and all the data is show with the else. Here is my code:...
View ArticleTypeScript error when setting a component's state: Argument of type 'X' is...
I am having a TypeScript error when calling setState:That's what I am actually doing: updateRequests(requests: any, cb:Function|null = null) { this.setState( { requests: { ...this.state.requests,...
View ArticleReact Native : elements of the list stuck together?
I have an issue: the elements of my list are not spread appart and I don't understand why.I have 3 elements for each letter and they should be separated.I think it may have something to do with the...
View ArticleReact Native: How to navigate from inside the NavigationContainer?
I have a component in my Navigation.tsx which controls the routes within my application. The component sits inside one of my Stack.Screen's under headerRight . Im trying to navigate to a different...
View ArticleHow do i write zod schema for a deeply nested object
I have the following data:{"2022-06-01": {"09:00am": {"time_table_id": 1,"job_id": 4,"start_working_time": "09:00am","end_working_time": "09:00pm","work_duration": "12:00:00","merchant_name": "Brands...
View ArticleHow to correctly set fields via useForm
I am faced with a problem that I do not understand. When the page loads, the form is filled with data from the store, as it should. In the form we have a suite field. When the page loads, it is empty...
View ArticleReact 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 ArticleNot able to navigate to next image or video in react native
Am working on displaying images and videos , On click of image or video am previewing it in fullscreen.I now want to move between those images and videos with left are right arrows.Am not able to...
View ArticleDynamic import in typescript does not work properly
In my ReactNative (expo) project, if I import the package like this:import { firebase } from "@react-native-firebase/messaging";then I can use firebase.message() without any problems (it works only for...
View ArticleHow To resolve expo-CLI has not yet been tested against Node.js v17.6.0
WARNING: expo-CLI has not yet been tested against Node.js v17.6.0.If you encounter any issues, please report them to https://github.com/expo/expo-cli/issuesexpo-cli supports following Node.js...
View ArticleHow to find names by id
Find Names by idsi have two arrays want to find names by their ids.person: [ {id: 1, name: 'abc'}, {id: 2, name: 'xyz'}, {id: 3, name: 'pqr'}, ]data: [ {id: 1, personId: [1,2,3]}, {id: 2, personId:...
View ArticleGetting error while running my react native app
Hello everyone I am new to react-native. I have cloned a repo from github and installed all the dependencies by running npm installBut while running the application I am getting an error.ERROR...
View ArticleComo conectarme a una base de datos de sqlite existente en React Native?...
Estoy trabajando con TypeScript y Actualmente estoy usando esta configuracion://Aqui hago las importacionesimport{enablePromise,openDatabase, ResultSet, SQLiteDatabase} from...
View Articleexpo-assets useAssets: Type 'Asset' is not assignable to type...
Following the small example provided by expo-asset's docs, passing an element from the asset array to an Image source prop gives the following typescript error:No overload matches this call. Overload 1...
View Articlereact-native-popup-menu MenuProvider typescript IntrinsicAttributes
I want to achieve drop down options in Flatlist,I have used React native popup Menu and in App.tsx I have declared the entry point as MenuProvider.I am getting this error.Type '{ children: Element[];...
View ArticleHow to create Views that are not the same if the varible is not the same?...
I would like to have my page with N elements inside and each of these elements should be placed in group of 2 (ex : A B, bellow: C D, bellow: E).How do I make it so that when I do my return, the View...
View ArticleHow to make it so that my styled component can expect ...rest as prop without...
I have a simple button component that has props title, wide and style. Inside that component I return a styled component to which I pass the wide, style props and I spread the ...rest . Unfortunately,...
View ArticleIn react-native using typescript I want youtube authentication demo to get...
I think it's use but how to use no idea about ithttps://github.com/google/google-api-javascript-client
View ArticleHow to create different views for different variables inside a for loop?
I would like to have my page with N elements inside and each of these elements should be placed in groups of 2 (A - B, C - D, E - F).How do I make it so that when I do my return, the View changes? And,...
View Articlereact native text onpress navigate to a part of your page
I want to navigate to a different place of my page when I click on a text. Does anyone know how to do this? (I want to keep being on the same page)For exemple if I click on white I want to go to the...
View Article