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.

track boolean state of each element in array and change styles if active react

I am trying to change the active style of an element in an array. As shown in the image below - when you press on the day the styles will change to add a border around it.So far I am struggling to...

View Article


How to fix error invalid hook call react native

How can I fix this error in react native:Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:You might have...

View Article


Hide bottomTabNavigator react native

I'm trying to make my bottomTabNavigator hide when I click on a screen and then become visible again once you scroll. Here is my code for my StackNavigator and BottomTabNavigator:function...

View Article

How to return a component only if the component returns something in a single...

I have this code and I would like to be able to write this in a single line of code. Would that be possible?If the component returns elements, return these elements from the parent component....

View Article

Typescript: Cleanest way to put conditional Android/iOS types throughout file?

I'm using Typescript in my React Native app, and have different types/interfaces for various Android/iOS objects. For example, I have a receipt object that is of type AndroidReceipt on Android, and...

View Article


it is possible to remove socket.io data limit?

I'm working on a file system, where user can open a room with a password and the clients can change his files. The server is on socket.io, and currently the clients can download one file at a time. I...

View Article

Nested React Native Navigation doesn't show up

i'm currently working on a React Native App, it has two Main Screens, the main navigator is a Tab Navigator. The second main screen has its own NativeStack Navigator.My Problem is, that the Second...

View Article

React Type Mutation response feedback

I have 1 file that is calling component file with the mutation function, the submit function works well but I cant pass the result to the call function in the mutate response, is there anyway I can...

View Article


Can't import module with typescript alias in storybook for react native

What I facedI'm creating a mobile app with TypeScript, React Native, and Storybook.A storybook code can import another component something like below without TS Error.Button.stories.tsximport React...

View Article


React: Warning: Maximum update depth exceeded

I am having this error index.js:1 Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one...

View Article

React Navigation modal V6 with expo

Good day, I tried using react-navigation 6 to display a modal using presentation: "modal" as specified on the docs. But it is not giving me the desired output. The modal does not display as a modal but...

View Article

React - Uncaught TypeError: Cannot read properties of undefined (reading...

I'd like to use an enum instead of magic string.But for some reason React doesn't allow me that:Uncaught TypeError: Cannot read properties of undefined (reading 'CREATE_PROGRAM')Yet the code seems...

View Article

React: "Maximum update depth exceeded" when mapping a basic array of data...

I am having this error index.js:1 Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one...

View Article


How to correctly add the onHoverIn TS type for the React Native Web Pressable...

I'm using React Native Web in combination with Typescript and I would like to use the React Native Web Pressablecomponent from the lib.However, I faced a problem when the VSCode blames the React Native...

View Article

Registration Form diferent in ios and Android an i0S React Native

I've built an app in Reac Native, but in the registration from I have a problem in iOS.enter image description hereThe options are aout of the selector, I don't know wich is the problem.This is my...

View Article


Image may be NSFW.
Clik here to view.

Registration Form different in iOS and Android an i0S React Native

I've built an app in React Native, but in the registration from I have a problem in iOS.The options are out of the selector, I don't know which is the problem.This is my code:import i18n from...

View Article

Set error on textinput if date is below a specified date react native

I am trying to make an age text input for my app that if you are below 18 sets an error state and changes color. Here is my code:function AgeButton() {const [age, setAge] = useState('');const [date,...

View Article


In React v6, how to check form is dirty before leaving page/route

I want a prompt to appear at the moment of wanting to leave the page without having canceled or without having sent the changesAs of v6.0.0-beta - useBlocker and usePrompt were removed I want to know...

View Article

Image may be NSFW.
Clik here to view.

How to apply correct flex layout with KeyboardAvoidingView react native

I am trying to create a responsive KeyboardAvoidingView however I am struggling to have this work with flexBox. This is the layout I am hoping for:And this is the layout I get:Here is my code: import...

View Article

Image may be NSFW.
Clik here to view.

How to have keyboardAvoidingView respond to clicking other button react native

I have a few textInputs in a keyboardAvoidingView which works fine when I click on one. But if I do not click outside the view and dismiss it but instead click on another textInput inside the view it...

View Article
Browsing all 6287 articles
Browse latest View live