React Native Expo App crashes in Production mode

Герда Морозова

My app crashes when I start to run it in production mode. In dev mode all works correctly. Only logs I have on the screen. What can I do?

I used: "expo": "38.0.10", "react": "^17.0.1", "react-dom": "^17.0.1", "react-native": "~0.62.2",

Link to screenshot with logs

Герда Морозова

I found my problem. It's all because of wrong auto import.

I have imported useState from "react/cjs/react.development", not from 'react'.

Instead

import { useState } from "react/cjs/react.development";

I need write

import React, { useState } from "react";

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

React Native App crashes if signed and released. Works fine in debug mode

Debugging app crashes in react native

Disable Debugging in Expo For React Native App

React Native 0.57 Android app crashes on Launch in release mode

React-Native Expo app async downloads

Publishing app for production React Native

Expo and React Native: Ready for production

Stripe integration with expo react native app

Degugging a react native / expo app with webstorm

Ejected expo react native app requires expo?

How to restart app (react native and expo)

What are the asset download mechanics of Expo and React-Native during development and production mode?

React Native App with Expo - QR code not loading

Fresh react native EXPO app is not working

Error on using Formik in react native expo app

react-native-maps production: app crashes when opening basic <Mapview/>

React App crashes when running the production build

Command line to update an expo react native app

React Native: Standalone, Expo built app on Android crashes when using Facebook login (works on iOS)

React Native Expo building standalone app

How to install the React Native Expo App in iOS?

modifying a bundled react native app using expo

Object is not a function in Expo(react-native) app

How to internationalize a React Native Expo App?

React Native Expo run in webview resize app

React Native Expo app showing two topbars

React Native Android crashes on enabling debug mode

Disable split screen in react native expo app

React-Native production app crashes all of sudden