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
CodePudding user response:
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.