Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow

Image may be NSFW.
Clik here to view.

Tab Bar Icons not vertically centered React Native Navigation

When testing my react native app (with expo) through the expo go IOS app the icons are not vertically centered, however when testing on web they are vertically centered. I have tried giving each icon a...

View Article


SyntaxError:...

I'm trying to write tests for my React Native app (using TypeScript). All my unit tests pass without issues, but when writing component tests, I encounter the following error:● ButtonComponent › calls...

View Article


How to Reboot android App in React Native?

How to Reboot android App in React Native ??I am trying to restart my React Native app programmatically on Android, but none of the solutions available online seem to work in production. I have tried...

View Article

React native Typescript path alias unable to resolve module

so basically, I created my React Native with Typescript using the commandline in RN homepage:npx react-native init MyApp --template react-native-template-typescriptAfter that, I ran the project and it...

View Article

Expo web build sourcemaps in Chrome Dev tools

ContextI'm developing an app with React Native with Expo (and thus Metro)I'm using typescript (.ts and .tsx files)I'm starting the app in web mode e.g. expo start --webI'm debugging it in Chrome Dev...

View Article


VSCode TS error with React.forwardRef functional component

We are using JavaScript (not TypeScript) to write our component library, and we have checkJs: true in our project's jsconfig.json file.All of our components are functional components (no class...

View Article

Image may be NSFW.
Clik here to view.

Round path corners with react-native-svg

I would like to see the corners of the following chart rounded as if it were a borderRadius style prop but cannot figure out what pathData element I am missing. It looks like strokeLineJoin and...

View Article

Path Alias Not Resolving Correctly Without Explicit /index in TypeScript

Issue with Path Alias Resolution in TypeScriptI am encountering an issue when using path aliases in TypeScript.When I import a module without explicitly including /index, such as:import { Colors } from...

View Article


Speech-to-text In React Native

So I'm trying to build the speech to text application in React Native for Android. I am using react-native-audio-recorder-player library for recording and for storage RNFS, the audio is saving in the...

View Article


ReactNative map view, markers won't display without moving the map after load

I have a Functional Component in my React Native app that when loaded, I want to check for user location permissions, and then load a map based on the users location. When that location is loaded I...

View Article

Image may be NSFW.
Clik here to view.

Module not found: Can't resolve Next.js - TypeScript

I receive the image´s error but I don´t understand why do I get it.Also attached the directory in the second image.import Link from 'next/link';import { useState } from 'react';import { ProductModel }...

View Article

How can I optimize this Date Selector Component in React Native?

I am quite new to this React Native world, just 6+ months of experience as of now.I'm trying to optimize my Date Selector component, which allows users to select a date from a Bidirectional FlatList....

View Article

How do I reset a screens state to its initial state when using react navigation?

I want to reset the state (back to initial state) in a functional component when navigated via navigation.navigate().Say a user navigates to an A screen and some state is set, then they click a button...

View Article


Add strong typing for react navigation props

I'm using typescript in my react-native project(expo).The project uses react-navigation, so on my screens I can set navigationOptions and I have access to the prop navigation.Now I'm trying to strongly...

View Article

I want to get the pdf file the API in react native. I am trying this

This is where i am getting my API's.I have used response type blob to get pdf file from the api but i m unable to do so..const CourseApi = createApi({ baseQuery, reducerPath: 'CourseApi', tagTypes:...

View Article


Can't mock a lib using jest.mock

So, I'm setting up the unit test environment on my current react native project using jest+@testing-library/react-native. I'm currently mocking some libs we have installed, the one that is giving me...

View Article

How to listen to user movement and count their distance in React Expo

I am relatively new to react expo and I am currently working on a personal project where I would like to:a. Ask the user for permission to grant location access (ok).b. When a button is clicked then...

View Article


How to Type Nested Screen Parameters Correctly in React Navigation with...

I am working with a React Navigation setup and TypeScript, and I am trying to define and enforce correct types for the navigation parameters. I have a nested stack structure where I need to properly...

View Article

Error email when try login with firebase configurations

Guys I make app on react native and make configuration with firebase . The register user is ok, supe.But whe I try login ok app, show error "Auth/emails invalaid"Show image please.I check all...

View Article

VSCode Quick Fix (`cmd + .`) not suggesting my library when installed from...

I'm developing a React Native + TypeScript library and installing it locally in another project using a .tgz file. The library works when I manually write the import, but VSCode does not suggest it...

View Article

Why I have different results between logging JSON.parse to console and...

I have a JSON string like this:{"operationSettings": {"guidelines": [ {"standards": {"thresholdValue": "${first_threshold}" } } ] }}and console.log(JSON.parse(json)) prints me an object with...

View Article


useInfiniteQuery fails on React Native with "observer.getCurrentResult is not...

When using useInfiniteQuery in React Native environments (Android and iOS), the app crashes with the error: "observer.getCurrentResult is not a function (it is undefined)". This error does not occur in...

View Article


Image may be NSFW.
Clik here to view.

TypeError: Cannot read property 'displayName' of undefined, js engine: hermes...

I am trying to build a React native mobile app, but it always presents the below error after which it has been completely built. I'm making use of TypeScript. I'm making use of Expo Cli and also I'm...

View Article

Cannot find native module 'ExpoCamera'

I am building a react-native app for android using typescript and expo. I want to access the camera. For this I have used the code from the expo documentation:import { CameraView, CameraType,...

View Article

Dynamic type for custom navigator in react native

In my React Native app I have a custom Navigator file in which I have multiple navigation methods because are used from multiple places in the app.I have a big issue at the moment because I have some...

View Article


Why is Electron Forge dropping typeorm index.js

Electron Forge, NextJS, Typescript, and React Native app runtime error:2025-03-06T15:06:23.146Z - ERROR:...

View Article

Shared package configuration used in monorepo with react and react native

I'm a bit desperate for help as I've been fighting with this for days now.I have 2 different projects, the first one is a single React web app and the second is a monorepo that holds a React web app...

View Article

WebView blocks KYC verification flow (target="_blank" issue)...

I'm here because I need some help about webviews in react-nativeDescriptionI am integrating react-native-webview to handle a KYC (Know Your Customer) verification flow. The WebView loads a secure...

View Article

ReferenceError: Property 'FinalizationRegistry' doesn't exist [Component Stack]

I build an expo app.How can I fix this error: ReferenceError: Property 'FinalizationRegistry' doesn't exist?It suddenly appeared without installing any new libraries. I’m only using design libraries...

View Article



Strange typescript error on React Navigations popTo function (react-native...

tl;dr: Although it works in the emulator, typescript gives me a strange error on react navigations nav.popTo function. Please help me figure out how to get rid of the error.This is my navigation...

View Article