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

How to use variables inside require()?

I'm having a problem here and I don't know if it's possible to do this, I'm pulling data as parameters of my route:onPress={() => navigation.navigate('product', { pathToImage:...

View Article


Error trying to access the error property of AVPlaybackStatus

I'm new to TypeScript and am trying to work with expo-av for audio playback.The following code gives me an error: TS2339: Property 'error' does not exist on type 'AVPlaybackStatus'.const { sound,...

View Article


Type annotations can only be used in TypeScript files

I have created a new react-native project using:npx react-native init But on App.js there is an error here:const App: () => React$Node = () => { return (...)}There is a red underline in "() =>...

View Article

How to structure React Native navigation for property passing with Typescript

I have a simple React Native app I'm putting together using Typescript and I'm trying to understand how to make the navigation work correctly.I a list of content sections and when one is selected to...

View Article

HTTPS calls are not working in React Native

I am developing an API call in React Native using Axios but I am not able to hit the backend after release using ./gradlew assembleRelease. in debugging mode the calls are happening, but I don't...

View Article


Proper Typescript type for a reused screen in react-navigation v5

For most of the cases, I follow a simple pattern to type any screen under react-navigation v5:// Params definitiontype RouteParamsList = { Screen1: { paramA: number } Screen2: undefined}// Screen1type...

View Article

what is the best way to send an js object to firebase?

I am using functional component of react native fully. I've been using it for about 1 week now but I'm still trying to get used to typescript.So I have written a functional component of a TextInput...

View Article

ViewStyle is not assignable to type StyleProp

i am new to react-native and typescript so might be missing or making some silly mistake that's giving this error mentioned below. I'm creating a component which uses some other library where the...

View Article


Enviroment variable at React Native does not working using TypeScript

I added the react-native-dotenv library and followed the guide using TypeScript.I created a .env fileMARVEL_API = <url>MARVEL_PUBLIC_KEY = <public-key>MARVEL_PRIVATE_KEY =...

View Article


Cannot read property of undefined in react navigation native with typescript

I'm building a react native app and I'm having trouble passing props to another screen using react-navigation/native.Navigation set upexport type RootStackParamList = { Home: HomeProps, LoginDemo:...

View Article

React Native with typescript unable to resolve modules

This is embarrassing, but I don't know what else to do. I wanted to port my little React Native project to TypeScript, so I created an empty React Native project with TypeScript template, tweaked...

View Article

Difference b/w React Typescript , React JavaScript and React Native?

I have confusion about React JavaScript , React Typescript and React Native.I just have idea that we use React Native for mobile applications and and React (Javascript,Typescript) for web...

View Article

JavaScript: Shorthand to toggle a non-boolean value

Is there a better shorthand to toggle foo?type Foo = 'ON' | 'OFF';let foo: Foo = 'ON';const toggleFoo = () => { foo = foo === 'ON' ? 'OFF' : foo;};toggleFoo();

View Article


Cannot update a child component on his parent

Well, I'm pretty new with React Native and I'm trying to update a child component on his Parent, the thing is that I'm giving this error (Warning: Cannot update a component from inside the function...

View Article

Creating a cross-sdk wrapper for Firebase (Firestore, Cloud Storage, and more)

I'm currently trying to find an abstraction that can allow me to run Firebase products (mainly Firestore, Storage, and Analytics) regardless of the platform (React Native, React, Node.js). I have...

View Article


How to pass props to an imported component in styled-components

a challenge has arisen here, I'm using React Native and I need to pass props to RectButton, does anyone know how?Because it is not a standard React Native feature, it is imported from...

View Article

Image may be NSFW.
Clik here to view.

Styled Components and TypeScript: No overload matches this call

I'm new to Style Components and I'm trying to build a weather app using React Native. I would normally use CSS modules but it seems that this isn't an option for mobile development.Here's the...

View Article


react unknown error "index.js:63 Uncaught TypeError: Cannot read property...

Using React and Bootstrap to create a dialog (deleted everything unnecessary, but the error persists):import React, { Component,} from 'react';import { Modal,} from 'react-bootstrap';class...

View Article

How to show dynamic options , rows and column in react fixed data table

I am using the react fixed data table.<Table rowHeight={50} rowsCount={rows.length} width={800} height={300} headerHeight={50}><Column header={<Cell>Name</Cell>} cell={({...

View Article

Image may be NSFW.
Clik here to view.

Jest tests fail after adding Typescript to a React Native project

So, I just added TypeScript to an existing React Native project (first commit dates from Feb 2016), and I'm getting the follwing errors when running unit tests (using Jest):This is the one that is...

View Article
Browsing all 6287 articles
Browse latest View live


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