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

How to mock React Navigation's navigation prop for unit tests with TypeScript...

I'm building a React Native app with TypeScript. For my navigation I use React Navigation and for my unit testing I use Jest and Enzyme.Here is the (stripped down) code for one of my screen...

View Article


How to install Detox + jest (ts-jest) + Typescript in a react-native project?

I've trying to use Typescript in my detox tests. This gist was the most I could find. I get an error telling that jasmine is not defined. Searching thorugh Detox's issues I found that they're only...

View Article


React native calendars agenda not showing items with same date

I'm currently using React Native Calendars library to build an agenda-like app on React Native, to get the data I need, I use Firebase Firestore library.This library's agenda uses a few properties in...

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

hi, it is possible to detect on react that the page is rendering by a...

it is possible to detect on react that the page is rendering by a ctrl+shift+t command ? for example, i need to detect this situation:The user closes the browser tabThen the user press ctrl+shift+t to...

View Article


React Native Maps how to prevent callout marker from appearing

I am using react native maps and would like the callout marker to stop appearing. A simple solution would be to use hideCallout(). However, users are able to click on the marker and the callout will...

View Article

React Native expo-camera landscape video

I'm recording some videos in different orientation (landscape and portrait) but my app is forced to be in portrait mode by config. The problem is that the result of every record is saved in portrait.Is...

View Article

React with Typescript window move to homePage but it restart the data

I am trying for this component move to HomePage but after it's move to the home page it restart the data within..any suggestion replace window.location.href = "/HomePage"?import React, {useEffect} from...

View Article


Typescript erorr while using 'react-native' button with additional props

I am new to Typescript and was trying to add it in my react-native project, so after integrating it, i am stuck at the type error for Button .Here is the code for belowimport React from "react";import...

View Article


React Native Typescript testing with Jest

I faced a problem with writing the jest test for a react-native app. The app uses typescript. I am new to typescript and cannot figure out how to pass navigation props to component. I have followed...

View Article

Image may be NSFW.
Clik here to view.

State resets when values change in an object, only when I populate from...

What I'm trying to do is the following:I want to select a single card view and edit itAfter editing it, I would like to save the changesPlease look at video I've upload for reference and could please...

View Article

Type '"ProfileScreen"' is not assignable to type '"MainScreen"'

I try to understand how to use React Navigation with TypeScript... I followed their official manual for TypeScript, so I've declared all required types:export type MainStackParamList = { HomeScreen:...

View Article

Image may be NSFW.
Clik here to view.

Property 'id' does not exist on type '{ id: string; content: string; }[]'...

I am super new to javascript and typescript and I am working on a kanban board React native project from a youtube video.Video link: https://www.youtube.com/watch?v=Vqa9NMzF3wc&t=1338sI am getting...

View Article


React Native how to pass google play store and App Store url parameters to input

How to pass google play store and app store url parameters value to input field?for example, https://play.google.com/store/apps/details?id={appID}&hl=en&referrer=ABC123i want to pass the ABC123...

View Article

React Native ScrollView dynamic footer

How to make React native scrollview footer. if the content is smaller than the screen, there should be a button at the very bottom of the screen; if it is larger, then the button should go to the very...

View Article


Image may be NSFW.
Clik here to view.

Switch ThumbColor with React-Native

I would like to make a switch on my app with react-native. The switch should look like this switch as demonstrated below:I've tried with Linear Gradient with unsuccessful<Switch trackColor={{ false:...

View Article

Expo background fetch initialize but never running

While developping my react native app, I need to do a periodic background fetch to another server.So I import 2 class from expo :import * as BackgroundFetch from 'expo-background-fetch';import * as...

View Article


Build React Native app with webpack instead of metro

My React Native app is part of a monorepo. All the "buildables" (api, backend, website) are written in TypeScript and built with Webpack.All of them use inversify. Therefore, the configuration to make...

View Article

Unable to import .js file in RN Typescript project

I have a file called Http.js in a module:export default class Http { //stuff}I can access this class from a typescript project as follows:import Http from 'myproject.core/services/Http';I recently...

View Article

Image may be NSFW.
Clik here to view.

How to combine a global MobX store with local state in the component?

I have the next component:const App = observer(({injector}: Props) => { const preferences = injector.getPreferences().execute() const themeStore = useLocalStore(() => ({ _theme: preferences.theme...

View Article
Browsing all 6287 articles
Browse latest View live


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