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

React native not recognizing finally

Finally keyword is undefined on a classic es6 helloworld fetch example.let isLoading = true; fetch("https://jsfiddle.net").then(function(response) { var contentType =...

View Article


Arrow function logic in React Native CLI project

I created a new React Native CLI project and was thinking to convert the App component to a class based component to fix a hot reload issue when using react-navigation.But I don't understand the logic...

View Article


Image may be NSFW.
Clik here to view.

Converting StackNavigator from v4 to v5 React Native error for auth

ERROR: "The action 'NAVIGATE' with payload {"name":"Auth"} was not handled by any navigator. Do you have a screen named 'Auth'? If you're trying to navigate to a screen in a nested navigator, see...

View Article

Image may be NSFW.
Clik here to view.

react native filereader.ReadAsDataUrl results in error

this is function call im using and i am just passing in a normal blob that holds a size and type variable.private _toBase64 = (file: Blob) => new Promise<string | ArrayBuffer | null>((resolve,...

View Article

How to use react-native-permissions

What i want to do I want to issue an alert with react native and instruct the other party to allow location information Bluetooth,Problem I decided to use the article below. However, looking at the...

View Article


Unable to resolve module @env [closed]

I have created custom ts module but react ts can't find this. Project structure is like:@types/@env src node_moudlestryin to use this https://github.com/tusbar/babel-plugin-dotenv-import

View Article

How To trigger custom topBar BackButton in React-Native-Navigation

first of all, there are plenty of this question in github but none of them have answered at all. that is why i am asking this here. I have an app where i have multiple pages and components. at some...

View Article

Platform specific import component in react native with typescript

I am using react native with typescript. I have a component with the following structurecomponent - component.ios.tsx - component.android.tsx Now I want to import the component. So, I am doing...

View Article


TypeScript React accessing array in handlesubmit()

I'm building an app that has 3 select fields. When the user hits submit on the form it will return a list of teachers that meet the value requirements. For example in the form you can select (3rd grade...

View Article


Image may be NSFW.
Clik here to view.

file reader return blobId [closed]

here is my code i am passing in an interface that hold a blob under a data:Bl private _toBase64 = (file: any) => new Promise<string | ArrayBuffer | null>((resolve, reject) => { const reader...

View Article

Material UI Select in Typescript

I have created a dropdown menu using Material UI select. It says "Search By". When we click it, it gives us a list. When I select one of the options, I want to store the option and change the "Search...

View Article

React native can't toggle state

Whenever I call the toggle function the boolean it checks is the same which means it never truly toggles. Assuming its something to do with binding to the current value and never getting the updated...

View Article

TypeScript types for TextInput's onChange event in React Native

I have a React Native Expo project using TypeScript. How can I add types for the onChange event for the TextInput? <TextInput keyboardType="numeric" value={`${value}`} onChange={(e:...

View Article


TypeScript with React Native - why does useEffect require 'current' check?

I'm using React Native with TypeScript and I need to set the focus on an input if certain conditions are met: const inputEl = React.useRef<TextInput>(null); React.useEffect(() => { if (isLast...

View Article

onCompleted() for GraphQL Mutation giving console error

If the mutation is not successful, I want to show the user a message. Code:function submitForm(RemoveUserMutation: any) { const { email} = state; if(email){ RemoveUserMutation({ variables: { email:...

View Article


Transpiling ActiveRecord objects to TypeScript types for non-mono repository

I've recently started development on what will be come a rather large mobile application (React Native) that consumes a Ruby on Rails API (in API mode).On the frontend I've used TypeScript extensively...

View Article

unable to run react-native test with jest

jest keeps failing on react-native 0.61.5https://github.com/mindsgn/OrbytDapp/issues/8yarn run v1.21.1 $ jest FAIL tests/App-test.js ● Test suite failed to runReferenceError: __DEV__ is not defined 3 |...

View Article


Snackbar not opening after GraphQL Mutation

I want my snackbar to open if the mutation is not successful. In this case, handleOpen() is called.When I hit the button, the mutation takes place and my page crashes. I get an error thatTypeError:...

View Article

The Keyboard cover TextInput form when I run the React Native Expo app

When I run the app with expo and use my DateFormInput component the Keyboard covers TextInput. I tried to use I , "@pietile-native-kit/keyboard-aware-scrollview", "@types/react-native-keyboard-spacer",...

View Article

TapGestureHandler not triggering onGestureEvent but onHandlerStateChange...

I'm trying to use the react-native-gesture-handler library to add double click event when a picture is tapped.the issue I'm running into is the onGestureEvent is never being triggered and...

View Article
Browsing all 6211 articles
Browse latest View live


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