Firebase JS SDK Alpha — everything you know and love, but up to 80% lighter.
import { initializeApp } from 'firebase/app';
import { getFirestore, getDocs, collection } from 'firebase/firestore/lite';
import { getAuth, onAuthStateChanged } from 'firebase/auth';
const firebaseApp = initializeApp({ /* */ });
const auth = getAuth(firebaseApp);
const db = getFirestore(firebaseApp);
onAuthStateChanged(auth, user => { });
getDocs(collection('todos')).then(snap => { });
Help test and give your feedback.
Got questions?
80%! Really?
Yes! The SDK is moving to a "import only what you need" model by adopting tree-shaking. The savings can be significant depending on what you're using.
What is this site?
This is an Early Access Program (EAP) for testing the new Firebase JavaScript SDK. This site will temporarily serve as the early documentation preview before we merge the new content into the main Firebase documentation site.
What kind of feedback do you need?
Anything and everything! You are an important part of this early access program. There are a lot of new possibilities with the new SDK, especially in terms of performance. We'd need to hear from you whether big, small, or if it's been said before. This is a significant change and we want to make sure the changes are creating a positive impact in your sites and applications.
Is this API going to change?
With your help it will! We made bold changes to get the size down and a lot of that caused breaks in the API. If you want a deeper reasoning as to why, we wrote up an entire article detailing our mindset. Our goal is to make sure we provide you with a library that adopts the modern JavaScript Module format and dramatically drops size. So far we’re really excited about where it’s going. We need your help to make it even better.