React Native colliding with typescript types in monorepo
I am creating a monorepo (yarn workspaces and Lerna) which is structured as follows.packages/ common/ (shared code) mobile/ (react-native ts) web/ (vite react-ts)The problem arises when I run yarn...
View ArticlePattern 'components/*/*' can have at most one '*' character
I am working on a React Native application with Expo, and I am using some template components from 3rd party.In my src directory, I have an "app" folder that holds my components to use.This is the app...
View ArticleChange the Access token of logged in cognito user with different Identity Pool
I want to achieve a single sign in on my multiple ApplicationI have sub-domainsEx :x1.subdomain.comx2.subdomain.comBoth have different identity poolI've tried to do the cookieStorageBut due to...
View ArticleTypescript resolving .ts instead of dirname/index.ts file
I have setup react native project using nx https://nx.dev/p/n/react-native/applicationNow I am getting error.Error: ENOENT: no such file or directory, lstat '***/apps/mobile/src/app/config.ts'My Dir...
View ArticleFunctional components as screens goBack() wont reset screen
I am using functional components as screen with typescript.When I navigate from screen A to B and call goBack() it navigate back to A but when I navigate again to B it does not reloadI don't want to...
View ArticleStore notes with Async Storage in React Native
I'm developing a Notes App and I want to save the notes in the device's memory. I'm using Async Storage, but without success. I create notes and they are displayed correctly until I reload the app, and...
View ArticleReact-navigation crash when going back from a nested navigation
I'm using React-navigation 6 on my React native applicationI have two StackNavigator in a BottomStackNavigator with those screens and params on each stack :export type BottomNavigationStack = {...
View Articlesocket.io disconnect event emitting slow on android but on electron it's fine...
The title says it all. How I can fix the speed of the android understanding that it is disconnected from the socket? My goal is to change the client window if he cant connect to the socket. In my...
View Articlehow to solve Property 'navigation' does not exist on type 'Readonly&
I have the following two pieces of code:CustomHeader.tsximport { View, StyleSheet, Button } from 'react-native';import { NavigationScreenProps } from 'react-navigation';import Icon from...
View ArticleHow to check if press outside a component in react-native?
I did a custom select but I have the problem to close it if I press outside the select or options. basically the "button" is a TouchableOpacity and when I click on it there appears the list of options....
View ArticleConfiguring Jest to work with React-Native, Typescript and ES6 modules...
ContextOur team just inherited a React-Native (not Expo), Typescript codebase without any tests for the TSX. We are currently trying to setup the first set of tests for some hooks, but are unable to...
View ArticleExpo listen for browser dismiss
In my expo react native app, the user is directed to a URL in a WebBrowser. I would like to be able to listen for when the user closes/ dismisses the WebBrowser and then execute a function. Is this...
View ArticleWhy do TypeScript tell me that a property doesn't exist on Button Component...
I'm using NativeBase on a React Native project and while everything works just fine when I run the app on my iPhone using Xcode, TypeScript tell me that the property "onPress" does not exist on the...
View ArticleHow does one trigger an action in a child functional component in React?
With a basic form/input layout, it's clear that a callback should be used for state changes from child to parent (initiated by child), but how can the parent ask the child component to re-assess its...
View ArticleTypescript Type for routeNameRef in React Navigation v5 in screen tracking...
I am following the docs to implement screen tracking with react-native-firebase analytics in a React Native App that uses Typescript. https://reactnavigation.org/docs/5.x/screen-tracking and...
View ArticleReactNative app not run on IOS real device and simulator inside Xcode
In VSCode's terminal app is running fine on IOS Simulator but when I try to run the app inside XCode on a simulator or real device it Shows an error.ld: library not found for -lDoubleConversionclang:...
View ArticleHow to use hooks as value of context provider in react js typescript
I had created a hook that fetches API and I need to call that hook in multiple components but while mounting that component every time the API is re-fetching so I had decided to call that hook as value...
View ArticleTypeScript fails to get the type of the elements of an object correctly
I am developing a React Native project with Expo. I have defined a function called setRoleColors that sets some colors based on the variable role.export const setRoleColors = (role: string) => {...
View Articleerror while using expo-image-picker:TypeError: undefined is not an object...
im using expo-image-picker i am facing thisError: Requiring module "node_modules\expo-image-picker\build\ImagePicker.js", which threw an exception: TypeError: undefined is not an object (evaluating...
View Articlereact-native-swiper add child dynamically
I want to add dynamically component in <Swiper>?Like that:React.useEffect(()=>{ setDataArray([...data, newData]); // newData is just an example.},[index])return (<Swiper horizontal={true}...
View Article