I want to filter the data from this json file: How can I use axios and React Hooks to filter this data and only get the state name and their actuals as variables to pass in a search UI later? This is my code currently: Answer I’d note that there probably isn’t a reason to try to get rid of
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
Native Module cannot be null (ios) – Expo
I am developing a Expo-managed (not bare) mobile application. I recently ran into this issue: it crashes on start on ios. and I understand that this has to do with some of my packages requiring ios native modules, therefor I have to eject before I can use this package. However, my goal here is not to eject but to find
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
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 together and pass the edited
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
Expo + React Native: Draw line between coordinates on two type of views
I am currently using this module: https://github.com/mxmzb/react-native-gesture-detector. I want to be able to draw a line from the points created. however, it only seems to output circles. It has a “Create Gesture” view: GesturePath is defined like so: When you draw on that view, it outlines the path using dots, like so: I would like it to be a smooth
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