All Questions
Tagged with expo javascript
2,909
questions
358
votes
38
answers
493k
views
Hide header in stack navigator React navigation
I'm trying to switch screens using both stack and tab navigator.
const MainNavigation = StackNavigator({
otp: { screen: OTPlogin },
otpverify: { screen: OTPverification},
...
74
votes
10
answers
117k
views
Implement pull to refresh FlatList
please help me out to implement pull to refresh on my app, I'm kinda new to react native, thanks. I don't know how to handle onRefresh and refreshing.
class HomeScreen extends Component {
state = { ...
59
votes
20
answers
136k
views
'expo' is not recognized as an internal or external command
After running npm install -g expo-cli and successfully installing the packages globally, expo is still not recognized as an internal or external command. Does anyone know how I might get around this ...
32
votes
4
answers
55k
views
How to build expo apk using eas build
After updating expo it no longer supports building apk files using expo build:android -t apk and instead advices to using eas builds using the command eas build -p android --profile preview but it ...
30
votes
6
answers
96k
views
React Native - navigation issue "undefined is not an object (this.props.navigation.navigate)"
Im following this tutorial https://reactnavigation.org/docs/intro/ and im running into a bit of issues.
Im using the Expo Client app to render my app every time and not a simulator/emulator.
my ...
30
votes
1
answer
782
views
React Native - iOS - Local image invisible (works on android)
I'm mapping TouchableOpacity with an Image nested inside of it. It works great on Android but on iOS the image is invisible. There is still a 75x75 touchable opacity that I can tap but the image is ...
29
votes
2
answers
43k
views
react native link using expo?
How can I use react-native link or How can I link a third party library manually in IOS and Android using exponent.
I was trying to link react-native-image-crop-picker but unable to use in exponent.
28
votes
8
answers
50k
views
React navigation 5 hide tab bar from stack navigator
I wanted to know how to hide the bottom tab bar from a specific screen inside my stack navigator that is nested on a material bottom tab bar
This is my code for my stack navigator
import React from '...
25
votes
3
answers
51k
views
How do I run an app on a real iOS device using Expo?
I am using Expo to run my application. I am able to see two options in Expo XDE:
open on iOS simulator
open on Android
I want to run my app by directly connecting to my device. Is it possible with ...
22
votes
1
answer
1k
views
React native (expo) web view Error net::ERR_CACHE_MISS
I am using react native(expo) and try to use web view package
And i am getting this warning in console and didn't see anything on mobile screen.
"sdkVersion": "36.0.0",
"expo": "~36.0.0",
...
21
votes
4
answers
9k
views
react-native swipeable gesture not working on android?
I am doing a react native course with Mosh (https://codewithmosh.com/). I am using expo. I am very new to react native and don't really know what I am doing, but I know my code should work. I double-...
21
votes
4
answers
18k
views
expo is out of date uninstall and run again to upgrade
when running my app on ios simulator, I am getting the following error This version of the Expo app is out of date. Uninstall the app and run again to upgrade.
Here is how I tried to upgrade expo-cli ...
21
votes
6
answers
43k
views
React Native - Expo: fontFamily 'SimpleLineIcons' is not a system font and has not been loaded through Font.loadAsync
So I get this error on Android device/emulator:
On iOS on the other hand, it's compiling just fine and the simple-line-icons are displayed properly.
I'm running the latest version of expo.
My ...
21
votes
7
answers
23k
views
Unable to use typescript with expo - "It looks like you're trying to use TypeScript but don't have the required dependencies installed"
I am receiving an error while trying to use Typescript with my existing expo project.
While following the docs, I created a tsconfig.json file in the project root.
When running expo start, I am ...
21
votes
4
answers
13k
views
React Native Getting this error 'Unrecognized operator abs'
Getting this error when adding react-navigation-drawer to my expo project, any idea how to fix this?
18
votes
2
answers
39k
views
Cannot access State inside Function
I am using React Native for my application, and at one point, I noticed that I have to type this.state.bar[this.state.foo][SOME_NUMBER] every time, within my components.
This works perfectly fine, ...
18
votes
1
answer
7k
views
What does "api.cache(true)" do in Expo's babel.config.js?
This line appears in the default Expo babel.config.js, but I can't find any reference anywhere to what it does. Is there anyone who knows what this does?
module.exports = function(api) {
api.cache(...
16
votes
2
answers
9k
views
how to use expo eas build offline --no Internet required
Is there any way I can use expo eas build fully offline without requiring an Internet connection.
Maybe an offline package or ...
16
votes
1
answer
15k
views
How to change App Display Name in Expo Managed app after publishing to App Store?
We have an Expo managed app. Initially we’ve set expo.name to Bridge - Debit Card in app.json file. We successfully released it into both stores - App Store and Google Play.
But later we noticed that ...
16
votes
2
answers
3k
views
Is it possible to hide the "BugReporting extraData" in React Native? (Using Expo)
Every time I open a React Native app with Expo, I get this massive message in the console with meta data about the app, that doesn't actually do much to help me debug. Especially because it's the same ...
16
votes
2
answers
2k
views
Download file using Blob in react-native
Since React-native v0.54 and Expo SDK v26, Blob is now supported.
I'm trying to download a file available on a URL to my phone (if possible, in my Downloads directory on Android)
All I can find for ...
15
votes
5
answers
20k
views
Can't find a variable atob
Screen1.js
import React,{useEffect} from 'react'
import {View,Text} from 'react-native'
import * as firebase from 'firebase/app';
import '@firebase/firestore';
const Screen1 = props =>{
...
15
votes
4
answers
8k
views
i18n.js Unable to resolve "make-plural" from Pluralization.js
I have a react native app and I am using expo.
I want to translate my mobile app so I am going to use expo-localization and i18n-js which I have installed following in the expo documentation.
Then I ...
15
votes
7
answers
21k
views
`Firebase` package was successfully found. However, this package itself specifies a `main` module field that could not be resolved
I'm trying to read and write to firestore, use firebase's authentication, and firebase's storage within a expo managed react-native application.
Full Error:
While trying to resolve module `firebase` ...
15
votes
10
answers
20k
views
Tunnel URL not found, falled back to LAN URL
How do I run my expo app using the tunnel? It worked last week but for the last 3 days, it stopped working.
Code written: expo start --tunnel
Methods I tried:
I used 3 different networks. One using ...
15
votes
8
answers
110k
views
How to fire componentDidMount() or useEffect Hook on every visit to a page/screen?
So I have an app with an activity. The app checks for Internet connection at the beginning. If there are no Internet connection, it will show a screen with a button to refresh the page. The problem is ...
14
votes
1
answer
7k
views
React-Native expo POST Blob
I'm using react native with expo and I'm trying to POST a blob image through fetch api. I'm using form-data format for the body and i have the next code:
const blob = await response.blob()
...
14
votes
2
answers
10k
views
Expo Web failed to compile "optional chaining"
Looks like Expo Webpack doesn't optional chaining.
I found this when I tried to install UI Kitten to Expo Web app.
This is the compile error after I added UI Kitten to the newly created Expo app
...
14
votes
1
answer
670
views
Error : Cannot read property fetch. Using jest-expo with react native
TypeError: Cannot read property 'fetch' of undefined
at node_modules/whatwg-fetch/fetch.js:4:8
at Object.<anonymous> (node_modules/whatwg-fetch/fetch.js:466:3)
at Object.<anonymous> ...
13
votes
3
answers
16k
views
Promise allSettled is not a function
I planned updating some Promise.all to Promise.allSettled in my React Native - Expo Project but the function does not Exist. i checked all Versions and everything fits but i still cant use the ...
13
votes
4
answers
13k
views
expo sqlite use existing database
According to the expo sqlite documentation for react-native I can initialize a db like so:
const db = SQLite.openDatabase('db.db');
This works and I can update the db like so:
update() {
db....
13
votes
1
answer
2k
views
How to handle a share intent(sending an image) in the expo app?
Is there any way to handle sharing files to expo app? According to the documentation of app.json it's possible to provide intentFilters, but I can't find anything regarding handling them afterwards.
...
12
votes
4
answers
8k
views
Best way to persist firebase login using expo go
I am trying to make an app in React Native using Expo Go. have successfully gotten google sign in working and it's all good. Unfortunately, the user's login does NOT persist between app relaunches. At ...
12
votes
1
answer
13k
views
How can I check if my React-Native app is running in a web broswer vs running in an ios/android app?
Basically what the title says. I am aware of the Platform component (https://reactnative.dev/docs/platform-specific-code) which can be used to check what device the app is running on. Although, from ...
12
votes
1
answer
6k
views
Is it possible to use more than one Babel preset in a project?
I am developing a React-Native app, which was installed using Expo, that creates .babelrc config with this code:
{
"presets": ["babel-preset-expo"],
"env": {
"development": {
...
12
votes
3
answers
37k
views
Module RCTEventEmitter is not a registered callable module (calling receiveTouches)
When i try to run the app after some changes i get this error.
What i'm doing wrong ?
Module RCTEventEmitter is not a registered callable module (calling
receiveTouches)
__callFunction
C:...
12
votes
6
answers
7k
views
You gave us a visitor for the node type TSInstantiationExpression but it's not a valid type
After expo update, my project not working
The error is:
Failed building JavaScript bundle.
node_modules\react-native-gesture-handler\src\index.ts: [BABEL] D:\data\Anonymous\ReactNative\test\...
11
votes
2
answers
15k
views
React Native Expo Router - Hiding the Stack header on home screen
I'm using expo-router in my React Native Expo app containing 2 screens, app/home.js and app/details.js. There is a Link on home.js that navigates to details.js screen.
Right now both screens have the ...
11
votes
1
answer
17k
views
environment variables in babel.config.js
We need to modify certain configuration/variables in our React Native app (built using Expo) depending on environment (local/dev/staging/production). I've looked at a number of libraries meant for ...
10
votes
11
answers
26k
views
Error: Failed to initialize react-native-reanimated library
I was working on a project on react native trying to create drawer navigation
I installed a navigation drawer, gesture handler, and reanimated libraries
and when I run I got an error
1st error :
...
10
votes
7
answers
6k
views
Receiving error while reqeusting notification permission on expo app
I Have a simple code that asks for notifications permission that worked in the past, but suddently,It's giving me this error:
"Error: Encountered an exception while calling native method: ...
10
votes
1
answer
29k
views
Convert base64 string to image in react native
Problem
I created a social media app with expo's react native, and wanted to add the ability to upload images. Since expo won't let you convert a file to a blob to upload, I just uploaded the base64 ...
10
votes
5
answers
15k
views
How to fix "redirect_uri_mismatch" error while using Expo.Google.logInAsync in React Native?
I am getting error code 400 "redirect_uri_mismatch" after calling Expo.Google.logInAsync() in my React Native application (on the built APK). Please NOTE, on the Expo client, I do not get an error, ...
10
votes
1
answer
4k
views
VSCode How to disable/remove "react/cjs/react.development" autocompletion
As the title says, there is a react/cjs/react.development library that is sometimes added when auto completing normal React elements like useState.
I used to ignore it and select React, but it ...
10
votes
3
answers
14k
views
How to I get rid of Console Warning: expo-app-loading is deprecated in favour of expo-splash-screen?
I keep getting this error that says:
expo-app-loading is deprecated in favour of expo-splash-screen
Here's the code for my Splash Screen in App.js
export default function App() {
const [IsReady, ...
10
votes
1
answer
13k
views
How to deep link to specific screen in react-native expo
I am creating a link URL with the following code:
Linking.makeUrl('lobby/', {
roomId: params.roomId
})
which outputs the following: exp://192.168.0.31:19000/--/lobby/?roomId=1585512451
This works ...
9
votes
17
answers
13k
views
Uncaught Error: Packager is not running at http://192.168.0.100.19001
I ran an app in a normal way in React-Native (EXPO):
expo init Myproject
cd Myproject
start of wire
However, next to running the app, the following message appears:
_ Something went wrong. (I.e.
_ *...
9
votes
2
answers
27k
views
Error: Couldn't register the navigator. Have you wrapped your app with 'NavigationContainer'?
I am learning to code with this video https://youtu.be/1hPgQWbWmEk , I did exactly what the guy did, but when I run expo start and then go to run in web browser what appears is this error:
Couldn't ...
9
votes
3
answers
44k
views
is there a 'fixed header' or 'sticky header' for react native?
Is there a way to have fixed and permeant top-titlebar(I think it's called as Header?) for react native?
Almost like a status bar, it's always there. But it needs to be at the top (even before the '...
9
votes
1
answer
6k
views
expo sdk 40 metro.config.js "Expected 'fromDir' to be 'string', got 'undefined' "
I’m on a monorepo with yarn workspace and I’m also using react-native-svg-transformer.
I have updated the sdk to the sdk 40 and I have this error in the metro.config.js :
and there is my metro.config....