React native error: JSX element type 'AppLoading' does not have any construct...
I am coding an react native app, and I am trying to import some custom fonts in the app. But, when the font is loading, I want to display the expo's loading screen or AppLoading Component and when I...
View ArticleHow to modify a property value in an array of objects in react native...
I have this array of objects and I want to modify the isPinned property to true. How can I do that?Array [ Object {"isPinned": "false","iso2": "AU","iso3": "AUS","name": "Australia", },]
View ArticleReact Native Animation - Icon and App name
React Native: How do you animate the Image? i.e Image should Come from header and name should come from Bottom
View ArticleContext doesn't update the value
I have a context like thattype ScanContextState = { confirm: boolean; toggleConfirm: () => void;};const defaultState: ScanContextState = { confirm: false, toggleConfirm: () => {},};export const...
View ArticleTypescript types from .d.ts file are not visible in the application
I was trying to type useContext hook and found this blog post https://blog.logrocket.com/how-to-use-react-context-with-typescript/as author wroteThe type.d.ts file that contains the TypeScript Types....
View ArticleReact native hide StatusBar completely
I want to hide StatusBar completely and not just do that:<StatusBar hidden/>Because this just hide the text and not the big rectangle (in white on the top):How to hide completely the StatusBar?...
View ArticleReact native exit app in react-navigation
How can I exit app in android and iOS with react navigation, if there is only one screen in stack?or is there any way to empty the main stack navigator?
View ArticleFormik handle submit type not corresponding with onPress's
I am using Formik in my TypeScript React Native app. I have a problem where the type of handleSubmit is not corresponding with onPress's. I have been looking around and could not find an answer.When I...
View ArticleHow to properly type navigation passed as props with React-Navigation with expo
How do I properly type navigation passed as props to another component? As per the docsEach screen component in your app is provided with the navigation prop automatically.And also,To type check our...
View ArticleHow to keep track of style for other items in array?
I have a list of options,I want to change counter color based on:if the selected option id equals current option id and the option quantity reached the max option Qty itself or Section options Qty.The...
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 Articlepicker onValuechange NOT WORKING IN REACT NATIVE
I am a bit new to react native and I am having difficulty getting selected values from my picker componentIs there any specific way to extract the selected picker item that works, I have tried all I...
View ArticleElement implicitly has an 'any' type because expression of type 'string'...
I am using Typescript in my React-native project.Code working properly as per desired output.but getting typescript conflicts.Sharing my code snippetsImporting json object from other config...
View ArticleJest cannot find module @env React Native
I'm currently facing some problem I'm using in my react native app https://github.com/goatandsheep/react-native-dotenv for handling .env.Error => Cannot find module '@env' from 'src/api/api.ts'I'm...
View ArticleReact-native - Cannot find module...
The problemHello everyone!I'm trying to build a mobile application with typescript, react-native, expo and jest. When I'm try to run tests: FAIL src/components/Button/tests/Button.test.tsx● Test suite...
View ArticleIs it possible to defer binding third party TypeScript declarations used by a...
I am wondering if someone has any insight on how there might be a better solution for the issue detailed here: https://github.com/callstack/react-native-paper/issues/2965Basically, this library uses a...
View ArticleWhy does Expo Location.getCurrentPositionAsync take a while to get location...
I am using android studios emulator (pixel3 XL) to get current location. I have enabled highest location accuracy and that takes a while 50 seconds+ to get the current location, however on a physical...
View ArticleTypeScript config file error: cannot find type definition file for 'android'
Hi I am programming a react native app, and when I run the code it gives me this error:cannot find type definition file for 'android'. The file is in the program because: Entry point for implicit type...
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 Article