0
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?

Expo, React Nativeで作成しているアプリを、任意のタイミングでリロードしたい時

Posted at

はじめに

タイトル通りに、Expo, React Nativeで作成しているアプリを、任意のタイミングでリロードしたい場合に、使える方法を知ったので公開しておきます。

公式Docに記載されていましたが、見つけにくかったので、記事として残しました。

方法

import { reloadAppAsync } from "expo";

// 好きな場所で
reloadAppAsync()

これだけです!

公式には、アプリのアップデートを踏まえたリロードを行いたい場合は、expo-updateを使用すべきだと書かれていました。

おわりに

公式Docの読み込みは大切ですね。

もっといい方法がある場合は教えてください!

0
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
0
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?