Skip to content
Advertisement

Tag: react-native

AsyncStorage setItem inside loop crashes

App crashes when trying to save something into asyncStorage. It crashes without an error message however I think the problem is in the while loop: As soon as the loop gets executed, the app crashes, console.log(“got here”) doesn’t even run. This function is called from a Pressable component: Answer I had to change it from a while loop to a

Changing a state of a variable in a function

I have two fonts one if the app is in arabic and one if the app is in English. My thinking is declare the state at the top but when the user changes the font it reverts the false state. The state is declared true when the user triggers the i18 .on function, but the app refreshes and changes the

React Native TextInput sends input on second press

Guys i’m new to React Native and also not good at JavaScript. In my app i have 2 TextInput and a Pressable button but the output is not making sense. I’ve tried to change timing of execution of some lines but result is the same. I’m using: expo, react native 0.68.2, android api 30 (Android Studio) output: Android Bundling complete

Advertisement