1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【React Native/Expo】Expoアプリを再起動する方法

Posted at

任意のタイミングでアプリを再起動したいことがあります。expo-updatesを使うと再起動できます。

インストール

expo install expo-updates

使い方

事前準備

restart.jsを下記の内容で作成します。

import * as Updates from 'expo-updates'

const Restart = () => {
  Updates.reloadAsync()
}

export { Restart }

再起動方法

import { Restart } from './restart'

const ourFunction = () => {
  Restart()
}
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?