Skip to content
Advertisement

Tag: expo

Expo listen for browser dismiss

In my expo react native app, the user is directed to a URL in a WebBrowser. I would like to be able to listen for when the user closes/ dismisses the WebBrowser and then execute a function. Is this possible? Answer I solved this by using an authentication session (openAuthSessionAsync) instead of a standard web browser (openBrowserAsync). With an auth

React Native Component Exception – Element Type is invalid: expected string…got undefined

I recently added a component to my project and this error is coming up for some reason. I know it’s being exported correctly from the component and imported by App.js correctly. (Exporting as default and importing without {}). It’s also strange that when I change the export of App from exporting in the function declaration to exporting from below with

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 “minDetectionInterval”) (it suppose to trigger after detecting a face). Is this a expo issue or my code is wrong ? Any help would be greatly

Jest testcase breaking in React Native Expo

Following is the error I receive on running a Sample testcase: My Testcase: My jest configuration in package.json: My dependencies in package.json: expo version: 37.0.0 react: `16.9.0 react-native: “https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz” Answer Found the solution on the Expo thread mentioning the exact same issue here. It looks like you’re using jest-expo v39 with a project running SDK37. LogBox was released with React

How to use ref in a functional component (expo camera)

I’m reacting my camera as a functional component but the documentation says To use methods that Camera exposes one has to create a component ref and invoke them using it. but in react documentation it says that I can not use ref in a functional component. if this the same thing as useRef? I’m trying to get the camera to

Can’t find variable: counter, in expo

Been using React for a bit and wanted to try out native using expo, when I click on a button to increment a counter, I get a ReferenceError on my phone saying “Can’t find variable: counter”, I don’t get any error on the expo gui or in VSCode, very confused. Answer Change your increment function to Make sure to define

Advertisement