Skip to content

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:…

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