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

Type error when using controlled datetime picker

How do I set a react state with a event.target.value in a datetime picker?Here is my code that is not working:const [ date, setDate ] = useState(new Date());<input type="datetime-local"...

View Article


Image may be NSFW.
Clik here to view.

React-Native Semi-Circle View

I'm trying to figure out how to draw a semi-circle component. It might not even be possible in pure React, but I'm willing to try using a library. I looked around and couldn't find one that seemed to...

View Article


Image may be NSFW.
Clik here to view.

How to solve ViewStyle typescript error in react native?

I'm trying to pass width parameter into StyleSheet like this :<View style={styles.children(width)}>{children}</View>And use it like this :const styles = StyleSheet.create({ modalContent: {...

View Article

How to wait for user action in separate Modal before continuing function...

I'm developing a drink counter app. User can add drinks but also has a drinkLimit state that is used to remind the user if the limit is reached when adding drinks. This reminder pops up in a modal with...

View Article

React-Native setTimeout function triggered after clearTimeout is called

In my react-native app, I am building a component that has a 'heads up display' with some controls, that only appears after touching the view. Then, one second after the last interaction of the user, I...

View Article


command to compile typescript in react-native?

I went through this tutorialhttps://reactnative.dev/docs/typescriptHowever, I am using npm and the only command to compile typescript I see in that page is "yarn tsc"I found another blog that said "npm...

View Article

React Native TypeSrcript Function Returning JSX.Element Type

I've got a TypeScript function which returns a React Native View.import React from "react";import JSX, {View} from "react-native";class DummyClass { static getView() { return (<View style={{flex:...

View Article

Setting up a proper dev environment with CI for react-native, typescript, nodejs

Unfortunately, we have projects with different nodejs versions. I am not sure if this is like java where I can have multiple jdks installed(multiple nodejs installed) and each project magically uses...

View Article


correct version compatibility matrix for expo, npm, node, react-native,...

I am doing the react-native typescript setup which I rannpx react-native init MyApp --template react-native-template-typescriptI installed typescriptnpm install -g typescript'npx --v' -> 6.14.15'npm...

View Article


React Native can't find .android.tsx and .ios.tsx files

I am trying to publish my app with Expo. It fails becauseUnable to resolve module components/MainButton could not be found within the project or in these directories: node_modules...

View Article

How to pass up nested state and avoid useCallback in react native

I have a parent and nest child component hierarchy of QuestionsAndAnswersScreen -> QuestionInput -> QuestionSelector -> AnswerSelector. I need to pass the question and answer object back up to...

View Article

how to give submit react hook forms onChange?

const handleChange = (e: any) => { handleSubmit(e);}I have controller inputs, I need that whenever an input is changed, it automatically submits, because I won't have a button. How can I do this?

View Article

How to use put an 'empty' value in react-hook-forms defaultValues with...

I use react-hook-forms with typescript and react native. When I set the defaultValues field in the useForm method I need to have in the beginning empty fields, there is no problem when the field is a...

View Article


How to hide bottomTabNavigator in nested stack screen

I am attempting to hide my bottomStackNavigator on my UsersScreen and then from there show it onScroll. function BottomTabNavigator() { //Some code// return (<Tab.Navigator initialRouteName="Users"...

View Article

How to Hide TabBarNavigator dynamically react native

I am looking for a way to hide my bottomTabNavigatoronScoll from within my UserScreenHere is my userScreen: function Users() { const {headerText, interestText, interestShell, interestsLayout,...

View Article


Multi-user role in Rect Native (TS + EXPO)

I'm developing market app with mongadb for goods and for auth (customer) users - firebase. Recently curator of my examination project amended structure and say : "Create an admin role for manual...

View Article

React Native FlatList, Styled Components and Typescript

I have a historic ongoing battle with styled-components , FlatList and typescript ...Up until now I've been able to make it work with the following :const StyledList = styled(FlatList as new () =>...

View Article


App crashing when enabling/disabling screenzoomer and font bold (Android only)

Im in this situation, where my app is crashing when I enable/disable the settings for screenzoomer and font bold WHILE the app is running in the background. On IOS it works fine, and the change...

View Article

React Native Maps - How to update callout markers

I am trying to update my callout markers when my mapview re-renders however, my mapview still displays the old data even though i am using useState. The callout marker updates if it closes and...

View Article

typescript Cannot add headers to a fetch api using react-native

I am using Fetch API from react-native and I am using typescript. My code looks like this:let responseLogin = await fetch('http://url_example', { method: 'POST', headers:...

View Article
Browsing all 6287 articles
Browse latest View live


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