how to implement reload app in react native expo (production)
Asked Answered
L

2

8

I tried to create restart with react-native-restart, but I get an error when calling RNRestart.Restart():

[Unhandled promise rejection: TypeError: null is not an object (evaluating '_reactNativeRestart.default.Restart')]

How do I implement reload in production ?

p.s. I use expo

Lifeboat answered 25/5, 2022 at 16:50 Comment(2)
i already was readingLifeboat
if you are using a managed workflow, call reloadAsync from expo-updatesHoehne
A
14

you can use expo-updates just run expo install expo-updates and restart the app with the method reloadAsync

import * as Updates from 'expo-updates';
Updates.reloadAsync()
Aston answered 31/5, 2022 at 13:40 Comment(0)
G
0
import { reloadAppAsync } from "expo";
reloadAppAsync()
Geometric answered 9/9, 2024 at 11:26 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.