Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Browsing all 6287 articles
Browse latest View live
↧

How to fix "Require Cycle" warning from using barrel files without ignoring...

Given directory:components|___foo | fooX | fooY | fooZ | index.ts|___bar | barA | barB | barC | index.tsfoo/index.tsexport * from './fooX';export * from './fooY';export * from...

View Article


Cannot invoke an object which is possibly 'null' context

why I get this ts error:Cannot invoke an object which is possibly 'null'.Context.tsximport React, { createContext, useState } from 'react';type ForgotPasswordProviderProps = { children:...

View Article


TS2322 - false | Element is not assignable to type ReactElement. Error does...

I understand what the error is saying and I have been able to fix it, but I was hoping someone could provide some clarification on why it's happening now and why it isn't happening in other areas of my...

View Article

Initializing redux state type checking with Typescript on component level

I coding React Native application using RTK Query with Typescript for state management, I have main slice which holds 3 depth level company object itself and other things like loading state etc. If...

View Article

Authenticating firebase user before a test suite

I'm trying to run some tests on a react-native component, but the component won't show data because it's trying to get data form firebase.The approach I'm going for now is to authenticate as a test...

View Article


React Native - Twilio chat conversation does not receive messages via...

I am currently trying to migrate a mobile react-native application (working with expo) from twilio-chat to twilio-conversations. Already did it with the browser based agent-application which works...

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

how to get the type of navigation state in react native

I want to keep an old navigation type from previews versions under 5 , now upagrading to 6 and I see that a lot things are changedafter a some research I found that exampleconst NavigationOptions = {...

View Article


While empty the Cart , Error: Rendered fewer hooks than expected. This may be...

Code Uploaded when I am deleting Item from cart that error appearing from here

View Article


React Native functions in Stylesheet typescript

I don't understand how to create a good interface dynamic stylesheetinterface Styles { container: (backgroundColor: string) => StyleProp<ViewStyle>; image: (color: string) =>...

View Article

React-Native check if mandatory fields are filled

I have a class called person which has a lot of fields I am registering a new user in my application and I am trying to see if all mandatory fields are filled, the fields are, first_name, last_name,...

View Article

How to read typescript error in order to understand what type should be used?

I don't understand how to handle typescript error like this.I am using react-navigation and tried to make custom header.From documentation there are list of parameters that this component get but I...

View Article

How to animate expanding / collapsing a text preview in react native with...

I'm creating a text component that I want to be 2 lines by default, and if the user taps on it, it will expand to the full length, and if the user taps on it again, it will collapse back to 2 lines.So...

View Article


Styled components along with inline for the same component

I sometimes see people using a component, that has a styled component attached to it. But in addition, they pass in inline styles for that component as well. (So they use both inline/styled component...

View Article

react-native-webview Typescript error: 'WebView' cannot be used as a JSX...

I am trying to set up a simple React Native app using Expo with TypeScript that shows a WebView. My App.tsx file contains the following:import Constants from 'expo-constants';import { StyleSheet } from...

View Article


Create screens with nested navigators using dynamic data

I have been trying to nest multiple navigators in React Native without success.What I want is a BottomTabsNavigator with:HomePsalmen: regular page is grid with 150 items and when clicked goes to...

View Article

React Navigation (Native) - Typescript Composite Screen Props - Navigation...

Goal: Trying to set types on navigation for a Tab screen navigating to a child Stack screenNavigator Structure: TabNavigator parent that renders a StackNavigator const HomeStackScreen = () =>...

View Article


Image may be NSFW.
Clik here to view.

'Stack.Navigator' cannot be used as a JSX component

My application still works and I don't have any error in console. I don't know why I have a red line under Stack.Navigator. But when I hover on it, it says that 'Stack.Navigator' cannot be used as a...

View Article

Share TS types between Node.js(express) and React Native?

i have 2 separate...

View Article

Image may be NSFW.
Clik here to view.

Cant download on iOS with expo-file-system

Im trying to download using Expo-File-System on an expo project with react native.The download option works on Expo-Go during testing but wont work when i push it in production mode.It says that it is...

View Article
Browsing all 6287 articles
Browse latest View live