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

useAnimatedGestureHandler onStart method correct context argument type

TL;DRHas anyone have any examples what the correct generic is for useAnimatedGestureHandler?Problem:I am following this tutorial on Reanimated 2 gestures animation. There's this example://...const...

View Article


Creates a button that when pressed, changes the text-TypeScript, React

I am new in this language and i couldn't find a solution.this is my code:{<a>Right now {order.status === 'full' ? 'x' : 'y'}</a>}And I want to change the text to a button that when clicked...

View Article


Typescript Decorators are not working as expected in React Native

I'm trying to use my own typescript dependency ioc-service-container in a react native typescript project.The dependency uses typescript property decorators, like this:const service = new...

View Article

How to add Auth0 in Stream Chat from getstream.io?

I am trying to use Auth0 for the user authentication of a chat application built using react native typescript and getstream.io. I tried to read the docs, but they didn't help me. I am totally new to...

View Article

expo-payments-stripe module fails after compilation into standalone apk

I've added a simple payment system into my Expo managed workflow app, but it acts quirky. The payments do perfectly work (even with the live keys, charging actual money) in development mode. Anyways, I...

View Article


Load a markdown file in Expo 40+ using typescript

In Expo 40, I need to load markdown files from my local bundle. I'm also using typescript.I found this post describing a solution, but the assetsExt App.json key doesn't seem to work anymore.I've tried...

View Article

Type Script error in React Native project

In React Native component I'm getting following TS error:No overload matches this call.Overload 1 of 2, '(props: Omit<Omit<TouchableOpacityProps & RefAttributes & { color: string; },...

View Article

How to bring focus to react component without using HTML input

Is there a way to bring focus to a React component without integrating a hidden HTML element to force the focus?I'm trying to implement keyboard binding (using React Native and Typescript) into my...

View Article


How can you use useState to update a component?

I have a segmented control library and a graph library that I want to use the tickFormat component from. I'd like to use both these libraries to create an axis-changing system. For example, if I click...

View Article


Cannot navigate to conditionally set Screen with react native navigation

I am fairly new to react native and it could be that I have set up my code poorly, however, I have my Navigator conditionally set - based on if the user is logged in or not.const App:...

View Article

Is there a way to combine classes and interface props in typescript?

I'd like to use componentDidMount(), but I have a const with a interface prop. Is there a way to do this in typescript?interface DataCardProps { onPress: () => void;}const Covid19DataCard = ({...

View Article

Passing in a useState function into segmented control

I'd like to use this segmented control library to change the axis of the victory-native bar charts library. In this case, I want to use useState to change the value of the state and make it so that...

View Article

How to type Partial State object in React Navigation?

New to TS and having trouble finding the right typing. I am trying to pass in a partial state object to a helper function I wrote to reset the navigation state. The partial state object looks like...

View Article


How to solve route.params undefined in react native screens typescript

I have this below where I fetched country's names from an API, and displayed them on the screen using routes. Now, I'd like to display item.country as the headerTitle. However, I am getting an...

View Article

React Native 0.64.0 doesn't update bundle in ios

Could you please help me with React Native?I'm stuck after the update to RN 0.64.0Actually, everything works, except the hot reload feature.RN just don't see changes, Metro bundler successfully starts...

View Article


How to do conditional rendering in flatlist

I have fetched from an API that records the country name and population. I have the country names in a search flatlist. My goal is to display a small circle next to the country name on the flatlist...

View Article

React Native FlatList || VirtualizedList restarts from 0 indexes, when...

I need help. I am producing a chat application in React Native, but i faced some problems when I scrolled through some chats in upper direction, thenas soon as I hit the TextInput, my FlatList or...

View Article


How to use a react hook in an arrow function?

I'm designing an application in react native for medical use case. The idea is to record some audio and to send it to a local server. Therefore, the ip adress is defined at runtime.Previously, I used a...

View Article

React native : how to share a websocket between components?

I want to use data recived from websocket in my components :also how I can share a websocket connection and data between components ?

View Article

Why onClick handler not changing className of icon tag?

Whenever i am clicking on square icon which have onClick handler linked with it it does not change className of that icon .Inside the icon tag if box.isChecked === true then i want to show className of...

View Article
Browsing all 6287 articles
Browse latest View live


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