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

Merging CompositeScreenProps into BottomTabScreenProps

type HomeTabParamList = { Chats: undefined; Contacts: undefined; Profile: undefined;};How do u mergetype ContactsScreenProps = CompositeScreenProps< BottomTabScreenProps<HomeTabParamList,...

View Article


How do you test onviewableitemschanged in SectionList?

I have a component that tracks which section of a section list is visible and updates the "active" state based on the visibility of the section.What I am trying to do is increase the code coverage of...

View Article


Typescript React Native navigation.push incorrect typing

In my react native app, I'm using @react-navigation/native-stack.The following line gives an error:navigation.push('ScreenName', {myParam});The error is:TS2345: Argument of type '[string, { myParam:...

View Article

Typescript warnings with dayjs relative time

i'm using dayjs relative time and it is working as expected but i can't fix typescript warningsfunction MyComponent() { var relativeTime = require('dayjs/plugin/relativeTime');...

View Article

Should I convert my whole project to typescript if i want to use one...

My project was made on Expo blank space mode, I want to add a calendar and the package i'll be using is written in Typescript, can I use it without converting the whole project into typescript?

View Article


How to use react-native-camera for realtime pose detection?

I have been trying to use react-native camera to capture an image. This image is given as input into a posenet-model. The detected pose is supposed to be drawn on the canvas.const takePicture = async...

View Article

React Native Flatlist error no overload matches this call

I am doing a React Native app with Typescript and I am having an error with the Flatlist renderItem. I am new with Typescript and React Native. The error says:No overload matches this call.Overload 1...

View Article

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


react-native useRoute hook : Property '.....' does not exist on type 'object'

In my expo app, I'm using useRoute() hook in a functional component from react-navigation. I also use typescript.The route I want to navigate to have only 1 parameter: identificationUrlwhen I want to...

View Article


Mocking with RN Detox

I am following the detox mocking guide with typescript. The app always prints console.log of X.ts file instead of X.e2e.ts file.Dependency version.react-native: 0.61.5,detox: 16.4.0Metro...

View Article

React Native: How can I test `maxLength` and `keyboardType` props and other...

I have a component InputAddressZipCode that is only used for 5 digit United States Zip Codes. I'm able to test onChangeText with react-test-renderer and @testing-library/react-native, but the test...

View Article

react native : What is the way to create an enum with 3 color types?

In my example I try add a variable button_gradient_color with 3 parameters of color and it shows an error.The error is:Enum member must have initializerWhat is the way to create an enum with 3 color...

View Article

react-native white screen after splash until I make a change in code

I'm getting a white screen in my react-native app after the splash screen. If however, I then hit command+s from any file in the project, to save it (regardless of changes or not), the app refreshes...

View Article


How do you get the font stylings for a component in Native Base

I want to use the same style for the text for Heading at 2xl, xl, md in react native markdown renderer/displayRight now I am doing something like this const { colorMode } = useColorMode(); const...

View Article

When entering value into TextInput the keyboard closes immediatly

As soon as i try to enter a value into my TextInput the keyboard on mobile closes and the value is not displayed in the TextField. This happens as soon as i use the useState hook to save the input in a...

View Article


React has detected a change in the order of Hooks called by Navigation

I'm really struggling to work out where my issue lies here, I have changed a lot of code recently and now I am met with this issue ERROR Warning: React has detected a change in the order of Hooks...

View Article

React Native with Typescript - Pressable pressed property

I am new using typescript with React and I cannot use pressed prop from Pressable in a react native app using typescript.I am using styled components and defining a prop to change styles when Pressable...

View Article


How can I navigate from one page to another in React-Native? I try to use...

I have a class which renders a button which should redirect me to another page. Can I use a navigator created by using useNavigation() inside render() as I did? I don't think so, because I tried this...

View Article

The Keyboard cover TextInput form when I run the React Native Expo app

When I run the app with expo and use my DateFormInput component the Keyboard covers TextInput. I tried to use I , "@pietile-native-kit/keyboard-aware-scrollview", "@types/react-native-keyboard-spacer",...

View Article

React Navigation 5 - Nested navigation doesn't navigate

I have a bottom tab navigator with two nested stack navigators like this:import React from "react";import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";import { createStackNavigator...

View Article
Browsing all 6287 articles
Browse latest View live


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