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

Google API: Invariant Violation: View config getter callback for component...

I'm making simple google api app by TypeScript via expo.Here is my script.It may shows simple map view.import React, { useEffect, useState } from "react";import GoogleMapReact from...

View Article


How to pass parameters in StyleSheet in React native with Typescript

I have just switched my Javascript react native project to a Typescript project, but when I changed it, I got a lot of errors on inserting functions in StyleSheet()Previously i used to do it like...

View Article


Jest test assertion, expect a nested object

When I do the below expect in jest with native testexpect(mockOnChange).toHaveBeenCalledWith({ order_type: expect.arrayContaining(['1']), number: '', ouser_ids: expect.arrayContaining(['user_id1']),...

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

Webview cannot be used as a JSX component, error in the node_modules? (React...

I am trying to use WebView for the first time but I have this error:'WebView' cannot be used as a JSX component. Its instance type 'WebView<{ originWhitelist: string[]; source: { html: string; };...

View Article


React Native Typescript : scroll with useRef and scrollIntoView

I wanted to be able to scroll to an element when I press on a element. (ex : I press D and it scroll down to the letter D) . Howether while there is no error here, it is not scrolling down.Here is my...

View Article

How to call an element that was created when you click on a button?

Here is my issue: I created a glossary (a list with the 26 lettters and the words for each letter). I want to make it so that when I click on one of the letter (I have 26 buttons), it will lead to a...

View Article

Running "tsc" is checking one file in "node_modules"

When running tsc on a react-native project, I'm getting a type error in one of the node_modules...

View Article


Image may be NSFW.
Clik here to view.

React Native - expo/vector-icons typescript type definition for icon name

I'm trying to find out the type definitions for the icon name of expo/vector-icons, since I am intending to use it for a component props.I am import expo/vector-icons like and and defining interface...

View Article


Image may be NSFW.
Clik here to view.

'Button' cannot be used as a JSX component

These ESLint errors happen with components imported from React Native Paper imports since Expo upgrade from SDK 43 to 45. The project is able to run though.import { Button } from...

View Article

Problem to identify when a WebView Downloads a file

I have been faced a problem in React Native (environment android) to identify when a WebView downloads a file.The current version of WebView is "react-native-webview": "^11.15.0"The WebView component...

View Article

How to bind value coming from api react native Picker

How to bind the value coming from API. I am getting value maharastra from api in react native picker.i.e. state_name: maharashtra, This code is for Add form and Update form getState(id) {...

View Article

react-native Hermes enabled causing function expression to be wrong when...

I am trying to extract a property name from a generic expression.Normally when using this code below works great.class Test { name: string;}const test = function<T>(item: ((x: T) => any) ) {...

View Article


this.props.t not being picked up by i18next-scanner in react native project...

I am working on a react native app build with Typescript, and I'm using react-i18next and i18next for translation. This is my i18next-scanner config:var fs = require("fs");var path =...

View Article

how to make a type with keys as values from another type in typescript

I have a objectconst navigatorNames: NavigatorNamesType = { homeNavigation: 'HomeNavigation', authNavigation: 'AuthNavigation'}where type is type NavigatorNamesType = { homeNavigation:...

View Article


When sorting components state of children are not updated

I have a parent component on which children need to be sorted by date. I have achieved to sort the component, however these component have a state that remain fixed when sorting button is...

View Article

React Native, accept native component properties as props and have custom...

I have this AppText component where I want to use a Props interface while having the ability to accept other props fields that I can consume with a spread operator. Here is my attempt...

View Article


TypeScript React Native Flatlist: How to give renderItem the correct type of...

I'm building a React Native app with TypeScript. renderItem complains that the destructured item implicitly has an any type. I googled and found this question and tried to implement what they teach...

View Article

How to create type for reference object in TypeScript React app with useRef?

I create reference for object in TypeScript React app:const inPropsRef = useRef({low: 10, high: 80, min: 0, max: 100})And I need to type my reference object. I searched a lot of info, but everything is...

View Article

Usage of types and interface without importing

I recently moved to typescript to write React Native applications and one thing I have noted is that I can use types without importing/exporting them. I have placed all the definition files under the...

View Article
Browsing all 6287 articles
Browse latest View live


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