The Android back button does not go back on the first click when I am inside the TopTabNavigator. What actually happens is that the tab goes left and right and only after a few presses of the Android back button only then it go back. How can such a thing be prevented and fix ? in my example i have
Tag: react-native
JSX expressions must have one parent element.ts(2657) In Return statement
I’m trying to build a Tic Tac Toe app that will let me choose 3×3, 4×4 and 5×5 grid and currently i’m stuck on 3×3 grid and I’m getting ‘JSX expressions must have one parent element.ts(2657)’ I tried adding another view element but it didn’t work. I will…
Put a Video player (expo-av) under an Image in React-Native
I’m currently learning React/React-Native using Expo, so I need to play a video this video is going to be saved in a server, but for now I’m testing the video playback locally with a random video and that video need to have a sticker kinda like instagram. I obviously think of merge the two things …
How to get last Firestore ID document
i need help with Firestore. I have a database with a collection of Clients that have some documents named by ID (1, 2, 3..) I want a function that count the number of documents of the collection and create a new document with the value+1 (eg: the last document was 6 and i want a new document 7). This is
React Native Image Upload File Extension Error
I am trying to upload an image to Django backend server with React Native. but I got an error that says File Extension “” is not allowed. Allowed extension are… and there is no problem with the data I sent. After some research I found out that a lot of people faced with this problem when usi…
expo FaceDetector keep triggering “onFacesDetected” event in “accurate” mode even without face
I’m new to react native. I’m using expo FaceDetector to detect faces. when I’m using it in “fast” mode it trigger “onFacesDetected” event correctly. But when I’m using “accurate” mode “onFacesDetected” event keep triggering (on “min…
How to add in 4 alphanumeric with space in Text Input?
I would like to add a TextInput in this format:- XXXX XXXX XXXX XXXX for XXXX can be alphabet or numeric. I getting this code but it just apply for numeric only. How can I do it for numeric & string? Please help. Answer This could work. number.replace(/s?/g, ”).replace(/(d{4}|[a-zA-z]{4})/g, ‘…
get data from all documents in an collection firebase firestore
i need to get the data of all the documents of a collection in the firestore. but in my forEach I am getting only the first document and I have two. he prints the console twice but in my setPoints state he puts only the first what I am doing wrong?? Answer I don’t immediately see what’s going wron…
Unknown Option error from Babel in React-Native app
I am building a react-native app with typescript in order to learn react native. Once I run the app with expo start and try to run on emulator I get this error: index.js: [BABEL] ……../index.js: Unknown option: .name. Check out https://babeljs.io/docs/en/babel-core/#options for more information abo…
Is the navigation prop immutable / pure? – react navigation v4
I’m using React Navigation v4, and I need to know if the navigation prop is immutable because I want to wrap my component with React.memo For context here is my (hopefully) pure React component: Answer I’m going to answer my own question based on this tweet by Satyajit Sahoo. It’s not immuta…