简体   繁体   中英

how to install older version of firebase

How can I install the old version of a firebase in REACT app that is v8 instead of v9? I'm practicing on some old projects in which the syntax for an older version of firebase is used, so as a beginner it's really cumbersome to use the v9 for me

You can import and use older versions of firebase by using 'firebase/compat'.

Importing firebase v8:

import firebase from 'firebase/compat/app';
import 'firebase/compat/auth';
import 'firebase/compat/firestore';

In theory, you should be able to just rewrite all your firebase 8 imports like this and have your code working just fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM