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

Image may be NSFW.
Clik here to view.

CORS issue with NGinx and fetch react native

I'm facing a cors issue only with web browser when I want to implement a react native app.Alhough I've configuredAccess-Control-Allow-Origin: *I'm still getting a CORS error from the browser.Is there...

View Article


Image may be NSFW.
Clik here to view.

Nested navigation typings in react-navigation

I was following the documentation tutorial about using typescript with react-navigation when I encountered some problems.I have a Tab navigator that consists of Stack navigators, each of which contains...

View Article


Errors like TS2353 do not cause build to fail: How to make sure the linter or...

For the following line:const { data: items } = useFindItems({ owner: user.id });I am getting this correct error in IntelliJ:TS2353: Object literal may only specify known properties, and owner does not...

View Article

ReactNative Paper, extend compound component with forwardRef

I am using ReactNativePaper v4 and having a difficult time extending components with Typescript when using forwardRef and having a compoundcomponent: TextInput.Icon. Here is my current setup:const...

View Article

Image may be NSFW.
Clik here to view.

React Native Image Header Scroll View - View scrolling beyond content

I am using the common library - React Native Image Header Scroll View. I've implemented this library before but face a problem which i can't seem to resolve. The issue is that the view is being allowed...

View Article


How to disable errors in node_modules/ for tsc?

I am not able to disable errors inside node_modules/.Running tsc will give me the following errors:Errors Files 8 node_modules/@rnmapbox/maps/src/components/Camera.tsx:450 4...

View Article

need help in optimizing chat responses like chatGPT

import {addMessage,modifyLatestMessage,removeLatestMessage,setError,setStatus,store,} from "@/store";import { io, Socket } from "socket.io-client";const messageChunkSize = 50;class SocketService...

View Article

Expo Typescript connect to MQTT Broker

I'm trying to connect to MQTT broker. I uses mqtt and here is my code:// the MQTT_URL is just a sample structureconst MQTT_URL = 'mqtt://sample-mqtt.com.ph';const MQTT_OPTIONS = { clientId: 'mqttjs_'+...

View Article


react-native-vector-icons/MaterialIcons jest-expo snapshot test error with...

I learning jest, writing my first snapshot tests for components using react-native & expo. I can run the test without the Icon component from 'react-native-vector-icons/MaterialIcons' inside my...

View Article


TypeError: Cannot read property Property of undefined with inversify in React...

General note about my technology: I have an application composed of React Native - Typescript - Inversify - Expo- Expo RouterWhen I try to inject my class with a constructor, e.g. ILoginUseCaseTwo, and...

View Article

Image may be NSFW.
Clik here to view.

React-native-paper InputText black background error

I have this error only on Android, has anyone been able to solve it? This is my componentexport const InputText = ({isPassword=false, showPasswordIcon='eye', hidePasswordIcon='eye-off', ...rest}:Props)...

View Article

Image may be NSFW.
Clik here to view.

React 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 Article

Why won't tsc --noEmit run in my GitHub Actions jest.yml?

This command won't work in any form:yarn tsc --noEmitnpx tsc --noEmittsc noEmitAll of them work in a terminal window.Here's the complete jest.yml:name: Run Jest Testson: push: branches: [main]...

View Article


Error 400 in google sign-in(React Native)

When I try to use google sign-in methods on youtube in my React Project, I met and error calledAccess blocked:TheReactApp's requestis invalidYou can't sign in because TheReactApp sent an...

View Article

Why Toast message not appear in react-native-root-toast?

I implemented react-native-root-toast in my expo application, I am using expo 51, please refer below code to understand the problemconst bgColor = {'error': { color: '#DA5C53', iconName:...

View Article


Best way to structure your store for large number of state values in Zustand

So, here is a little bit of context: I am very new to Zustand and wanted to try it, so I decided to use it in my car app project. In the project, I have car filtering functionality where I have many...

View Article

React Native Paper FAB.Group Icon stays on screen after navigating to another...

Whenever I try to swop between screens the FAB still remains visible and sometimes interferes with the functionality of components on the lower part of the screen as if a large square is rendered over...

View Article


Your Expo app is stuck on the splash screen and doesn't proceed past it

I know there are other questions like this, but none of them have answers. I followed the Expo sample exactly, but I’m encountering an issue where my project gets stuck on the splash screen in the...

View Article

react-native text below icons goes to the second line after the sixth letter...

I'm having an issue with the React Native tabs visual appearing properly.The text I added to the _layout.tsx file with the code below goes to the bottom line as if there was no space after the fifth...

View Article

Image may be NSFW.
Clik here to view.

How to change Background color TabBar behind border radius with ReactNative

I would change background color behind the TabBar with ReactNative like the image below.My App.tsx code where I define the NavigationContainer and the Tab.Navigator :import React from 'react';import...

View Article

Why my button isnt in scrollview in code ( but it show it in phone ?)

<ScreenWapper bg="white"><Vie<ScreenWapper bg="white"><View styles={styles.container}><Header title="Create Post" /><ScrollView contentContainerStyle={{gap: 20}} > {/*...

View Article


Error Building .AAB File: Could Not Find...

I'm encountering an issue when trying to build the .aab file using the command:./gradlew bundleReleaseThe error message is as follows:A problem occurred configuring root project 'ProjectName'.>...

View Article


How to use AWS Amplify in React Native with Typescript Project?

I'm trying to add Amplify Authentication in my react native project which uses typescript.There is a package given in amplify documentation 'aws-amplify-react-native' which is used as a middleware to...

View Article

Command 'pod install' failed, Cause: /bin/bash -c

I am new to expo in general, and I was following some docs to install some icons and It required me doing npx pod install but it keeps failing. I am hitting this command from my root directory...

View Article

Expo React Native ts Nativewind ( (NOBRIDGE) ERROR Error: Exception in...

I have problem with my expo react native with nativewind project,when I upgrade the expo SDK from 51 to 52 and test the app on actual device iPhone 12 pro via expo app downloaded from app storeit...

View Article


How to specify (optional) default props with TypeScript for stateless,...

I'm trying to create a stateless React component with optional props and defaultProps in Typescript (for a React Native project). This is trivial with vanilla JS, but I'm stumped as to how to achieve...

View Article

Image may be NSFW.
Clik here to view.

RectNative TouchableOpacity onPress is not working properly

In my React Native app, the TouchableOpacity onPress event is not working properly. When I repeatedly tap the button, it occasionally triggers the onPress action. Each tap shows the button's click...

View Article

Expo router bottom tab inside a stack

I have a stack with expo router and want to navigate to a tab. The project layoutapp _layout.tsx Login.tsx (tabs) _layout.tsx home.tsx profile.tsxThe app -> layout.tsx file has stack. The index.tsx...

View Article

Image may be NSFW.
Clik here to view.

React Native & TypeScript : Property 'focus' does not exist on type 'RefObject'

That's what I am doing: declare passCodeInput: React.RefObject<TextInput>;But here's an issue that I am getting while trying to call focus method:setTimeout(() => this.passCodeInput.focus());I...

View Article



error in React Native with the command: npm run reset-project

I'm following Expo start developing. When I try npm run reset-project I get error 500 in my app.The problem is a file that is created: +not-found.tsxenter image description hereIn the file:import {...

View Article


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>