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

Image may be NSFW.
Clik here to view.

ESLint issue when using babel module-resolver and typescript

TS is not inferring the type when using resolved imports, but it does when using relative imports. Any help would be appreciated.useTheme has"Unsafe call of an 'any' typed value."This error does not...

View Article


React Native blob/file is not getting to the server

I am extremely stuck here. I don't know what I'm doing wrong. I'm trying to send a file from the an expo-image-picker component to the server. The form is sent, but the image is not. The fetch command...

View Article


Push parent arrays element and chidren array into new array in javascript

"items": {"hotdrinks": [ {"id": "9aa113b4-1e4e-4cde-bf9d-8358fc78ea4f","price": 20,"name": "Tea","img": "../assets/img/HotDrinks/1_udupibhavan.jpg" }, {"id":...

View Article

Image may be NSFW.
Clik here to view.

Property 'X' is missing in type 'DefaultRootState' - but the property is...

Here's my Interface which I'm using with mapStateToProps:export interface IStore { cache?: any; dataManager?: IUR; userPrefs: IUP; IModal?: IfingerprintModal;}export interface IModal { cbCancel:...

View Article

How to open device's calendar app to add an event from React Native application?

I make fetching data from API, whose results look like thisObject {"name": "HackForGood: Grab Hackathon 2022","site": "HackerEarth","start_time": "2022-05-29T18:30:00.000Z","url":...

View Article


with expo after Web Bundling complete , showing blank page

i followed a tutorial for adding web support using to a expo project **. using typescript, react-native-web and webpack. looks like it works for everyone. but for me, i get a blank web page after Web...

View Article

Image may be NSFW.
Clik here to view.

How to handle multiple environments in React Native CLI (specific case)

I want to handle different environments by letting the developers select which one they want to.So basically lets say we have a login screen and a "Settings" touchable there. When the user press it, or...

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


How to handle state that can assume many variation depending on the backend...

In my app I have a recurring scenario in which the app shows a feedback screen to the user after some backend command is executed to provide info for the user on the outcome of that request. My...

View Article


Mocking react-native-keychain, undefined is not a function

I'm trying to write a test for my helper Functions which uses the react-native-keychain library.I accordingly to the documentation mocked the library.I added a directory react-native-keychain to the...

View Article

React native , incrementation

I have a variable pass and I did a {pass++} inside of one of my return. Howether , while it increment the pass, it also show the pass on my page. How to make it so that it is not on my page?Here is my...

View Article

Dynamic link by using react native firebase/app in the with specific userid

I tried to implement user referral and earn system using dynamic link in my react native app but want add some code in link example userid or some unique code in link when I refer to user so that I can...

View Article

How to use useEffect inside a View in React Native

I want to use an useEffect inside a return (inside a Text that is inside multiple View to be exact) and from what I know, I must use {...} in order to say that what I write is some code. Howether I got...

View Article


React Native, issue with setting the state (setState)

I have an issue with my code : when I try to convert a variable to a state, my variable state pass2 that was incremented became a number 3 for all my implementations while my former variable was...

View Article

React Native, creating a if inside a return

I want to create an if inside my Flatlist return so that each time a new Flatlist is called, my 'pass' will go back to 0Here is my code:<FlatList data={letter.description} numColumns={2}...

View Article


How to scroll to a specific element that can be modified? (React Native)

I created a glossary and want to have access to the content of a specific letter if I click on the letter (I have a list of letter at the top of my page).But here is the issue: while I've found how to...

View Article

React Native - You attempted to set the key with the value on an object that...

If I attempt to set a previously defined memoized value to a list of values of length one, no error throws. If I set it to a list of length > 2 I get the following errorError: You attempted to set...

View Article


Load script funtion inside expo web

I am trying to load a script for true conversion, something like the following (I changed it a bit just to show as an example):<script type="text/javascript"> var _tip = _tip || [];...

View Article

Image may be NSFW.
Clik here to view.

'Stack.Navigator' cannot be used as a JSX component

There is a type issue using react navigation, when use Stack.Navigation or Stack.Group from createNativeStackNavigatorThe issue saids that the types dont match with JSX.element at the end of the...

View Article

Image may be NSFW.
Clik here to view.

react-native-dotenv Unable to resolve module @env

I'm setting up this lib for TypeScript like heremy env:API_KEY=someKey..i'm setting up type/env.d.ts:declare module '@env' { export const API_KEY: string;}my babel.config.ts: module.exports = function...

View Article
Browsing all 6287 articles
Browse latest View live


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