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

How to create FlatList using API and passed to a child component

I called the Api in component Homeconst apiKey = 'i can't show it to you';const apiPath = `https://api.themoviedb.org/3/movie/popular?api_key=${apiKey}`;export default function Home() {const...

View Article


Image may be NSFW.
Clik here to view.

How do I catch AWS Amplify errors?

If you consider the following code React.useEffect(() => { Auth.currentUserInfo() .then((data) => { if (data.username) { //do something with data } }) .catch((error) => console.log('No logged...

View Article


React Native Expo Start ignores typescript errors

I'm using Expo with Typescript, and when running with expo start (and potentially building), it ignores my TypeScript errors.VS Code will still show an error, but I can reload the App and run it on my...

View Article

React Native - Integration of camera and photo upload in one screen

I am trying to find a library or a way to implement the camera and upload pictures in one screen like it is on IOS or android camera. For example you open the camera app and you get to take the photo...

View Article

Fix auto-imports in typescript monorepo

I am trying to set up a monorepo as I thought sharing common code is a great idea in an ecosystem of applications as they have a lot of common types, logic and functions. My repo includes a...

View Article


Destructured imports vs namespace in react libraries using typescript

My question is : is there any consequences in performance if using for example:import * as Reanimated from 'react-native-reanimated'Instead of :import { useSharedValue, useAnimatedStyle, withspring,...

View Article

Type Script - React Native: the correct way to pass parameters to the...

What is the correct way to pass the parameters to the NavigationDialog function so that it can be used wherever I want?In my example I tried to pass the parameters but I think something is wrong with...

View Article

Image may be NSFW.
Clik here to view.

onPress executing two times for work properly

i have an issue this is issue is function i create to clear and collapse my information doesn't work correctly here need i press two times to work. const collapseItemList = (item: Speciality) => {...

View Article


Jest - React-native - how to mock a function in ref property?

Im using a library called 'react-native-actions-sheet', which is basically a drawer/panel component. I use it as follows:import ActionSheet from 'react-native-actions-sheet';import { ActionSheetRef }...

View Article


The navigation of useNavigation() doesn't work

I'm trying to use the navigation that comes from the @react-navigation/native library but it keeps showing this error:No overhead matches this call.Overloading 1 of 2, '(...args: never): void',...

View Article

React-Native - How to convert JS to TS using functional component declaration...

I've to implement Pendo's React Native implementation in TypeScript. My App.tsx has following code that has to modified to accommodate Pendo's methods in it:Current App in TS:export const App: FC = ()...

View Article

Type 'MutableRefObject' is not assignable to type 'Ref | undef

I get the following error when passing a ref to a <TextInput>in React Native:Type 'MutableRefObject<ForwardRefExoticComponent<TextInputProps & RefAttributes> | null>' is not...

View Article

`allowsMultipleSelection: true` throws error in expo-image-picker (expo SDK 46)

I have no problem selecting one image at a time with allowsMultipleSelection: false. But with allowsMultipleSelection: true, it throws an error.Note: I do have allowsEditing: false.What's happeningI...

View Article


UseState com valor undefined [closed]

não entendo por que meu state não tras nada no params, mas funciona no console.loguseEffect(() => { async function loadProducts() { const response = await api.get('/product/category', { params: {...

View Article

React Navigation Custom Tab Typescript Params

I am developing projects with Typescript language with React Native library. While creating a Custom Tab Bar, parameters include state, descriptors, and navigation. What should I specify as a type with...

View Article


Image may be NSFW.
Clik here to view.

I am getting error as Type 'boolean' is not assignable to type...

i am getting this error in create a new project in react native,how to get this fixed?here is the package details"react": "18.2.0","react-native": "0.70.1","typescript": "4.4.4"

View Article

I show the error is " undefined is not a function," whenever i call a one...

i am using a class component and i declared multiple function in same class and try to call one function to another but they show me an error like undefined is not a functionMy coding structure is...

View Article


undefined is not an object (evaluating 'location.coords.latitude'). trying to...

This is a piece of the code: import MapView, { Callout, Marker, PROVIDER_GOOGLE, Region,} from "react-native-maps"; const wait = (timeout) => { return new Promise(resolve => setTimeout(resolve,...

View Article

App crashes on iOS when trying to upload image to firebase storage using...

to pick the image i usedimport * as ImagePicker from 'expo-image-picker';image pick process const permission = await ImagePicker.requestMediaLibraryPermissionsAsync(); if (permission.granted === false)...

View Article

Dependency Source Code Debug React Native

I am working on a local dependency/library for my react native app.I want to debug that locally added dependency for a react native app in my chrome/Web Storm debugger. Debugger connection 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>