Possible way to get the offsetTop value for the bottomsheet when its dragged...
I am using Gorhom's BottomSheet& Github for React NativeI am unable to find offsetTop for the bottomSheet on the screen when it is scrolledCan some one please help me with this?Note: I need the...
View ArticleWhen using expo start the app requests work but when using expo run:android...
I'm configuring the OneSignal lib for PushNotification in an app that uses the expo with Bare Workflow, however, when I run the expo start it doesn't recognize the native parts in code that the lib...
View ArticleReact Native monorepo: TS2786: 'View' cannot be used as a JSX component
I have a monorepo with the following structure:repo/├─ node_modules/├─ package.json├─ packages/│├─ design-system/││├─ package.json // dependencies installed in repo/node_modules├─ apps/│├─ my-app/││├─...
View ArticleOrganize screen components when touched
I want to know how can I make it so that even when the TextInput boxes are clicked the screen stays on place, or so that it scrolls over to the box you want to fill.Screen with nothing going on.Screen...
View Articlehow to make generic component in react native?
I want to make a generic component but how can I make it ?Model:export interface ISelectOptionsRLV<T, C> { data: T[]; onPress: (option: C[]) => void;}GenericComponentList:import { StyleSheet,...
View ArticleReact native typescript how to type FlatList
I don't find the way to type a FlatList in react nativeexport interface Category { id: string; title: string; bg: string;}export const CATEGORIES: Category[] = [ { id: "c1", title: "Italian", bg:...
View Articleexpo app with testing react-native-testing-library and jest-native "has no...
I'm trying to use jest-native as extra matchers and i'm having an installation problem i think...I am on a react-native ts app with expo and here are my...
View Articlereact-native/Typescript: how to pass autoComplete value to TextInput as the...
Consider I have a custom component like this with a TextInput inside (for example a modal input dialog):interface Props { ... autoComplete: string;}const ModalInputDialog = (props: Props) => { ......
View ArticleWhat has better performance? Hook on parent component and pass prop to...
OverviewI'm refactoring some older code that has some class based components and I need some clarification on the performance of PureComponent.IssuePreviously, the translation hook was at the top level...
View ArticleWhen to use useCallback?
I have gone through a couple of articles on useCallback and useMemo on when to use and when not to use but I have mostly seen very contrived code. I was looking at a code at my company where I have...
View ArticleTypeScript is seeing interface type but not deducing correctly
TypeScript compiler can't decide which type to use: or I don't understand what I'm doing.Am i doing something wrong with the type inferencetype Func = (() => void) | ((id: number) =>...
View ArticlePassing react-native-paper-dropdown multiSelect as a prop throws a "Render...
In the CustomDropdown file, adding the multiSelect prop crashes the React-Native application built with expo (on a phsyical iPhone SE 2020 device).CustomDropdown.tsx:const CustomDropdown = ({ name,...
View ArticleMultiple Warnings when testing a component with React Testing Library and Jest
I am new in the testing world and I have spent days trying to figure out how to unit test a signup screen in React Native (with Expo) using React Testing Library. When i run my script to run the tests...
View ArticleHow do i write zod schema if my data return triple inside object like example...
{"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 Outlet @ The...
View ArticleResolve error: webpack with invalid interface loaded as resolver after Expo...
Since upgrading Expo SDK from 43 to 45, I am getting these ESLint errors in every file on the first import line. The project is able to run though.I've tried adding the...
View Article'Button' cannot be used as a JSX component
These ESLint errors happen with components imported from React Native Paper imports since Expo upgrade from SDK 43 to 45. The project is able to run though.import { Button } from...
View Article'Stack.Navigator' cannot be used as a JSX component
There is a type issue using react navigation, when use Stack.Navigation or Stack.Group from createNativeStackNavigatorThe issue saids that the types dont match with JSX.element at the end of the...
View ArticleReact Native TextInput onFocus does not allow onPress of other child components
Nested TextInput component does not allow other components' onPress function to be called. Only when the TextInput is not focused, the onPress works fine.React Native Version : 0.66.3Here is my...
View ArticleError implementing multiple dropdown with show or hide item
I have code with purpose to show menu with dropdown. The menu currently consists of 3 dropdowns. but when I click on one menu, the other menu items also appear. What is wrong? Below is the code: const...
View ArticleTypeScript: How to define a type with nested objects
I'm trying to define this object type.colors: { text: "#343D48", // body color and primary color text_secondary: "#02073E", // secondary body color heading: "#565F67", // primary heading color...
View Article