長野エンジニアライフ

東京から長野に移住したエンジニアのブログです。🦒🗻⛰

【Firestore】The timestampsInSnapshots setting now defaults to true and you no longer need to explicitly set it. ...の対処法

Firestore の Timestamp の仕様変更による警告

ブラウザのコンソールに以下のエラーがでた

The timestampsInSnapshots setting now defaults to true and you no
  longer need to explicitly set it. In a future release, the setting
  will be removed entirely and so it is recommended that you remove it
  from your firestore.settings() call now.

原因

firebase.jsにて、以下の設定を削除することが推奨されているため

firestore.settings({ timestampsInSnapshots: true });

対応

firebase.jsにて、以下の設定を削除すると、表題の警告はでなくなった。

firestore.settings({ timestampsInSnapshots: true });

参考記事:

qiita.com