News Articles expo

How to change image when a button is clicked on Expo?

I am trying to make an app that shows cat pictures on Expo. I have a cat picture that is displayed originally. I have a button and when I click the button, I want to change the cat picture that is displayed. Here is what I have: let imageUri = {uri: ‘https://images.unsplash.com/photo-1615789591457-74a63395c990?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8ZG9tZXN0aWMlMjBjYXR8ZW58MHx8MHx8&w=1000&q=80’}; I define a […]

Why dosen’t the code inside useEffect execute every time the reference added as its second argument changes?

I am using a flatlist to generate some videos (which are rendered using their own seprate component). Every time a video goes out of the viewport I’m trying to pause the specific video. (using expo video in this case). I do this using viewabilityConfig and onViewableItemsChanged props in the flatlist options. Code in flatlist component: […]

How to Build an Instagram Clone App With React Native

It’s time you take your web development to the next level. You need to start developing mobile apps and if you ain’t there yet, start building to get started. Read the full story Source: Hackernoon

How do I reset Redux between tests?

Has anyone been able to clear Redux between tests? What did you do? I have a React Native Expo app using Redux. I have a test that works in isolation, but when I run all tests, it fails because there are state changes left in redux from other tests. How do I ‘flush’ the redux […]

How To Build a WhatsApp Clone in React Native: Beginner’s Guide [Part 2]

A Non-Comparable WhatsApp Clone made using react-native (Expo) and Firebase Read the full story Source: Hackernoon

React Native Multiple Images Picker

The problem So, I am developing a react native application and I am facing the callenge of selecting multiple images from the user gallery. Just like apps like WhatsApp, Telegram, Twitter and even Reddit do. So with that in mind, i tried to use launchImageLibraryAsync from expo-image-picker but, as specified in their documentation, the "multiple […]

React-Native Firebase Snack Expo Failed to resolve dependency

I’m receiving this error in Snack Expo when I try to use firebase: package.json (7:5) Failed to resolve dependency ‘[email protected]’ (Can’t resolve ” in ‘/tmp/snackager/snackager/buildStatus/1/[email protected],android,web/package’) Source: React – Stack Overflow

Why do I get the error "None of these files exist:", even though the file does exist?

I am trying to import something from ./components/task using this line of code: import Task from ‘./components/task’; but I get the error None of these files exist: * componentstask(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json) * componentstaskindex(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json) 1 | import React from ‘react’; 2 | import { StyleSheet, Text, View } from ‘react-native’; > 3 | import Task from ‘./components/task’; | […]

How to fetch api data from mysql table to dropdown list in React Native?

I’m making a form and I need to load data in a dropdownlist and select it, but I don’t know how to do it and I can’t find examples, except those that have a json file with all the data. I can insert my data with success but I need a dropdownlist for other important […]

Expo DateTimePickers cancel & ok button can’t see at spinner display

I’m using expo DateTimePicker, My issue is when I choose spinner display their cancel and Ok buttons are not display but I can see on other display mode. I used "expo": "~43.0.2", "@react-native-community/datetimepicker": "3.5.2", My Code import React, {useState} from ‘react’; import {View, Button, Platform} from ‘react-native’; import DateTimePicker from ‘@react-native-community/datetimepicker’; const App = () […]

Map Centered on Current Location with a Marker? React Native Expo

I have a mapView, and I want to centre my map on the user’s current location when the map screen is opened. By following the expo documentation, it should be achieved with Expo Location API. However, the documentation is unclear. I took part of the code from expo Location documentation. So, how should I integrate […]

How to centre a MapView on a user’s current location when the Map Screen is opened? React Native Expo

How to centre the map to show a user’s current location when the map screen is opened? By following the expo documentation, it should be achieved with Expo Location API? However, the documentation is unclear. I took part of the code from expo Location documentation and implemented it in my Map Screen. So, how should […]

"Expo start" does not start Javascript bundling

On my react native app, expo start command sometimes triggers Javascript bundling which runs the app on the device but most of the time it does not. Once I read the QR code on expo start command, the Metro bundler is stuck at "Starting Metro Bundler". I try to run the app through LAN and […]

Error Showing Memory Leak While Signing Up

Warning: Can’t perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function. How should I solve this error?? The error occurs while using these screens… I guess it’s caused by […]

React Native maps re-render

I have a progress bar(react-native-elements) that is animated using useEffect(). This component has MapView(react-native-maps) and it’s re-rendered on every tick thus I can’t move the map. How can I still have that progress bar without re-rendering the map? Home const Home = ({ navigation }) => { …some code above… useEffect(() => { //setProgressValue(0); var […]

How can I install Firebase in Expo React native?

I’m trying to install Firebase in Expo. On the Expo document, they recommend using this library react-native-firebase. What do I need to do after running this command? npm install –save @react-native-firebase/app Source: React – Stack Overflow

Expo / Auth0: Can’t get PKCE Flow to work – Failed to verify code verifier

I’m using Expo + Auth0, following the PKCE flow here. However, I am struggling to get it to work. I receive an authorization code, but when I try to exchange the authorization code and verifier for an access token via a POST to https://auth0-api-url.com/oauth/token, it says Failed to verify code verifier. Maybe how I’m creating […]

Expo MediaLibrary.getAssetsAsync({album:album}) is not returning album – React Native

I am using Expo MediaLibrary to get videos from a specific folder and I am facing this problem. MediaLibrary.getAssetsAsync() shows there are no media inside an album. while there are media inside the folder. Code: let album = await MediaLibrary.getAlbumAsync("GrabTube") console.log(album ) let assets = await MediaLibrary.getAssetsAsync({album:album }) console.log(assets) response: Object { "assetCount": 1, "id": […]

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.